diff options
author | hwspeedy <ns@bigbear.dk> | 2024-02-28 21:14:30 +0100 |
---|---|---|
committer | hwspeedy <ns@bigbear.dk> | 2024-02-28 21:14:30 +0100 |
commit | 1537718abeb6807f341a19babd4cee3b46877d91 (patch) | |
tree | 507cc0ddd26336a537e9399991c6882aaaf11e51 /modules | |
parent | 8209e8508b2a35611d92f8d93b3aa0297d72f405 (diff) |
FIX GCC warnings and enable debug for old distros
Diffstat (limited to 'modules')
-rw-r--r-- | modules/benchmark/guibench.c | 4 | ||||
-rw-r--r-- | modules/devices/printers.c | 2 | ||||
-rw-r--r-- | modules/devices/spd-decode.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/benchmark/guibench.c b/modules/benchmark/guibench.c index 2b4f3b11..e0f8351e 100644 --- a/modules/benchmark/guibench.c +++ b/modules/benchmark/guibench.c @@ -68,7 +68,7 @@ static gchar *phrase = NULL; static gboolean keypress_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { const int magic[] = { 0x1b, 0x33, 0x3a, 0x35, 0x51 }; - const int states[] = { 0xff52, 0xff52, 0xff54, 0xff54, + const unsigned int states[] = { 0xff52, 0xff52, 0xff54, 0xff54, 0xff51, 0xff53, 0xff51, 0xff53, 0x62, 0x61 }; static int state = 0; @@ -80,7 +80,7 @@ static gboolean keypress_event(GtkWidget *widget, GdkEventKey *event, gpointer u } if (state == G_N_ELEMENTS(states)) { - int i; + unsigned int i; for (i = 0; i < G_N_ELEMENTS(magic); i++) { phrase[i + 6] = magic[i] ^ (states[i] & (states[i] >> 8)); diff --git a/modules/devices/printers.c b/modules/devices/printers.c index d880e691..0ed9dcda 100644 --- a/modules/devices/printers.c +++ b/modules/devices/printers.c @@ -43,7 +43,7 @@ struct _CUPSDest { static int (*cups_dests_get) (CUPSDest **dests) = NULL; static int (*cups_dests_free) (int num_dests, CUPSDest *dests) = NULL; static void (*cups_set_server)(const char *server) = NULL; -volatile static gboolean cups_init = FALSE; +static volatile gboolean cups_init = FALSE; GModule *cups; diff --git a/modules/devices/spd-decode.c b/modules/devices/spd-decode.c index 511504b2..cf4c89d7 100644 --- a/modules/devices/spd-decode.c +++ b/modules/devices/spd-decode.c @@ -1160,7 +1160,7 @@ static GSList *decode_dimms2(GSList *eeprom_list, const gchar *driver, gboolean } if (s) { - strncpy(s->dev, g_basename(spd_path), 31); + strncpy(s->dev, g_path_get_basename(spd_path), 31); s->spd_driver = driver; s->spd_size = spd_size; s->type = ram_type; |