diff options
author | bigbear <ns@bigbear.dk> | 2024-02-08 02:57:20 +0100 |
---|---|---|
committer | bigbear <ns@bigbear.dk> | 2024-02-08 19:52:53 +0100 |
commit | 08e01f35f747bfe30a40ea99cbcd63ad7fb94e7e (patch) | |
tree | a727faeb3ffb38d523b0700a63e6e537d295a152 /modules/devices | |
parent | 4c249cfdc742d162fdb384fba61236cada3d9f29 (diff) |
FIX GCC Warnings
Diffstat (limited to 'modules/devices')
-rw-r--r-- | modules/devices/battery.c | 2 | ||||
-rw-r--r-- | modules/devices/dmi.c | 5 | ||||
-rw-r--r-- | modules/devices/inputdevices.c | 2 | ||||
-rw-r--r-- | modules/devices/pci.c | 2 | ||||
-rw-r--r-- | modules/devices/printers.c | 4 | ||||
-rw-r--r-- | modules/devices/resources.c | 2 | ||||
-rw-r--r-- | modules/devices/x86/processor.c | 2 |
7 files changed, 10 insertions, 9 deletions
diff --git a/modules/devices/battery.c b/modules/devices/battery.c index 3424fa9d..e356c14a 100644 --- a/modules/devices/battery.c +++ b/modules/devices/battery.c @@ -57,7 +57,7 @@ __scan_battery_apcupsd(void) GHashTable *ups_data; FILE *apcaccess; char buffer[512], *apcaccess_path; - int i; + guint i; apcaccess_path = find_program("apcaccess"); if (apcaccess_path && (apcaccess = popen(apcaccess_path, "r"))) { diff --git a/modules/devices/dmi.c b/modules/devices/dmi.c index 263d6944..64de77d9 100644 --- a/modules/devices/dmi.c +++ b/modules/devices/dmi.c @@ -72,7 +72,7 @@ gboolean dmi_get_info(void) const gchar *group = NULL; DMIInfo *info; gboolean dmi_succeeded = FALSE; - gint i; + guint i; gchar *value; const gchar *vendor; @@ -102,7 +102,8 @@ gboolean dmi_get_info(void) state = (getuid() == 0) ? 0 : 1; break; case -1: - state = 2; + state = 2; + break; case 1: value = dmi_get_str_abs(info->id_str); break; diff --git a/modules/devices/inputdevices.c b/modules/devices/inputdevices.c index 54828b79..301641d4 100644 --- a/modules/devices/inputdevices.c +++ b/modules/devices/inputdevices.c @@ -113,7 +113,7 @@ __scan_input_devices(void) usb_lookup_ids_vendor_product_str(vendor, product, &vendor_str, &product_str); } - if (bus >= 0 && bus < sizeof(bus_types) / sizeof(gchar*)) { + if (bus >= 0 && (guint)bus < sizeof(bus_types) / sizeof(gchar*)) { bus_str = bus_types[bus]; } diff --git a/modules/devices/pci.c b/modules/devices/pci.c index c7114672..859fa339 100644 --- a/modules/devices/pci.c +++ b/modules/devices/pci.c @@ -45,7 +45,7 @@ static const struct { static const gchar *find_icon_for_class(uint32_t class) { - int i; + guint i; for (i = 0; i < G_N_ELEMENTS(class2icon); i++) { if (class2icon[i].class <= 0xff) { diff --git a/modules/devices/printers.c b/modules/devices/printers.c index e849e1dc..fb9389ac 100644 --- a/modules/devices/printers.c +++ b/modules/devices/printers.c @@ -181,7 +181,7 @@ const struct { void scan_printers_do(void) { - int num_dests, i, j; + guint num_dests, j, i; CUPSDest *dests; gchar *prn_id, *prn_moreinfo; @@ -209,7 +209,7 @@ scan_printers_do(void) options = g_hash_table_new(g_str_hash, g_str_equal); - for (j = 0; j < dests[i].num_options; j++) { + for (j = 0; (int)j < dests[i].num_options; j++) { g_hash_table_insert(options, g_strdup(dests[i].options[j].name), g_strdup(dests[i].options[j].value)); diff --git a/modules/devices/resources.c b/modules/devices/resources.c index 1436192d..c9d1ccb5 100644 --- a/modules/devices/resources.c +++ b/modules/devices/resources.c @@ -72,7 +72,7 @@ void scan_device_resources(gboolean reload) SCAN_START(); FILE *io; gchar buffer[256]; - gint i; + guint i; gint zero_to_zero_addr = 0; struct { diff --git a/modules/devices/x86/processor.c b/modules/devices/x86/processor.c index 62d32135..518786b5 100644 --- a/modules/devices/x86/processor.c +++ b/modules/devices/x86/processor.c @@ -685,7 +685,7 @@ gchar *processor_describe(GSList * processors) { gchar *dmi_socket_info() { gchar *ret; dmi_type dt = 4; - int i; + guint i; dmi_handle_list *hl = dmidecode_handles(&dt); if (!hl) { |