From 2c0dc6c6ba9bc604f189504a3412e5f4e66f7b67 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 16 Nov 2016 00:43:15 +0100 Subject: [PATCH] Avoid warnings about signedness issue --- tools/widget.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/widget.c b/tools/widget.c index 017418d..b617793 100644 --- a/tools/widget.c +++ b/tools/widget.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include "Desktop.h" @@ -45,8 +46,8 @@ typedef struct _WidgetPrefs { String const * title; - unsigned int width; - unsigned int height; + int width; + int height; } WidgetPrefs; @@ -78,8 +79,7 @@ static int _widget(WidgetPrefs * prefs, int namec, char ** namev) if(prefs->width > 0 || prefs->height > 0) gtk_window_set_default_size(GTK_WINDOW(window), (prefs->width != 0) ? prefs->width : -1, - (prefs->height != 0) - ? prefs->height : -1); + (prefs->height != 0) ? prefs->height : -1); } g_signal_connect(window, "delete-event", G_CALLBACK(_widget_on_closex), NULL); @@ -143,7 +143,7 @@ int main(int argc, char * argv[]) switch(o) { case 'h': - prefs.height = strtoul(optarg, &p, 0); + prefs.height = strtol(optarg, &p, 0); if(optarg[0] == '\0' || *p != '\0') return _usage(); break; @@ -151,7 +151,7 @@ int main(int argc, char * argv[]) prefs.title = optarg; break; case 'w': - prefs.width = strtoul(optarg, &p, 0); + prefs.width = strtol(optarg, &p, 0); if(optarg[0] == '\0' || *p != '\0') return _usage(); break;