diff options
author | bigbear <ns@bigbear.dk> | 2024-02-08 02:55:50 +0100 |
---|---|---|
committer | bigbear <ns@bigbear.dk> | 2024-02-08 19:52:53 +0100 |
commit | 3c387015ab71e9a0f4ec375e194a499019272c60 (patch) | |
tree | 85c59f20fb82d21d5f732137f16194383a364e69 /hardinfo2 | |
parent | 3d25cd5ae8241b687b970f8c1861451636a8f6ea (diff) |
FIX GCC Compatibility
Diffstat (limited to 'hardinfo2')
-rw-r--r-- | hardinfo2/pci_util.c | 8 | ||||
-rw-r--r-- | hardinfo2/usb_util.c | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/hardinfo2/pci_util.c b/hardinfo2/pci_util.c index 7dbc909d..f0c5059a 100644 --- a/hardinfo2/pci_util.c +++ b/hardinfo2/pci_util.c @@ -74,9 +74,9 @@ const gchar *find_pci_ids_file() { char *pci_lookup_ids_vendor_str(uint32_t id) { gchar *ret = NULL; - ids_query_result result = {}; + ids_query_result result;// = {}; gchar *qpath; - + memset(&result,0,sizeof(ids_query_result)); if (!find_pci_ids_file()) return FALSE; @@ -92,9 +92,9 @@ char *pci_lookup_ids_vendor_str(uint32_t id) { static gboolean pci_lookup_ids(pcid *d) { gboolean ret = FALSE; - ids_query_result result = {}; + ids_query_result result;// = {}; gchar *qpath; - + memset(&result,0,sizeof(ids_query_result)); if (!find_pci_ids_file()) return FALSE; diff --git a/hardinfo2/usb_util.c b/hardinfo2/usb_util.c index d9f943b1..744f084f 100644 --- a/hardinfo2/usb_util.c +++ b/hardinfo2/usb_util.c @@ -273,7 +273,9 @@ static gboolean usb_get_device_lsusb(int bus, int dev, usbd *s) { static gboolean usb_get_interface_sysfs(int conf, int number, const char* devpath, usbi *intf){ gchar *ifpath, *drvpath, *tmp; - ids_query_result result = {}; + ids_query_result result;// = {}; + + memset(&result,0,sizeof(ids_query_result)); ifpath = g_strdup_printf("%s:%d.%d", devpath, conf, number); if (!g_file_test(ifpath, G_FILE_TEST_EXISTS)){ @@ -335,9 +337,10 @@ static void find_usb_ids_file() { void usb_lookup_ids_vendor_product_str(gint vendor_id, gint product_id, gchar **vendor_str, gchar **product_str) { - ids_query_result result = {}; + ids_query_result result;// = {}; gchar *qpath; + memset(&result,0,sizeof(ids_query_result)); if (!usb_ids_file) find_usb_ids_file(); if (!usb_ids_file) @@ -356,9 +359,10 @@ static gboolean usb_get_device_sysfs(int bus, int dev, const char* sysfspath, us usbi *intf; gboolean ok; int i, if_count = 0, conf = 0, ver; - ids_query_result result = {}; + ids_query_result result;// = {}; gchar *qpath; + memset(&result,0,sizeof(ids_query_result)); if (sysfspath == NULL) return FALSE; |