Avoid warnings about signedness issue
This commit is contained in:
parent
acefb7f480
commit
2c0dc6c6ba
|
@ -32,6 +32,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <System.h>
|
#include <System.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "Desktop.h"
|
#include "Desktop.h"
|
||||||
|
@ -45,8 +46,8 @@
|
||||||
typedef struct _WidgetPrefs
|
typedef struct _WidgetPrefs
|
||||||
{
|
{
|
||||||
String const * title;
|
String const * title;
|
||||||
unsigned int width;
|
int width;
|
||||||
unsigned int height;
|
int height;
|
||||||
} WidgetPrefs;
|
} WidgetPrefs;
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,8 +79,7 @@ static int _widget(WidgetPrefs * prefs, int namec, char ** namev)
|
||||||
if(prefs->width > 0 || prefs->height > 0)
|
if(prefs->width > 0 || prefs->height > 0)
|
||||||
gtk_window_set_default_size(GTK_WINDOW(window),
|
gtk_window_set_default_size(GTK_WINDOW(window),
|
||||||
(prefs->width != 0) ? prefs->width : -1,
|
(prefs->width != 0) ? prefs->width : -1,
|
||||||
(prefs->height != 0)
|
(prefs->height != 0) ? prefs->height : -1);
|
||||||
? prefs->height : -1);
|
|
||||||
}
|
}
|
||||||
g_signal_connect(window, "delete-event", G_CALLBACK(_widget_on_closex),
|
g_signal_connect(window, "delete-event", G_CALLBACK(_widget_on_closex),
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -143,7 +143,7 @@ int main(int argc, char * argv[])
|
||||||
switch(o)
|
switch(o)
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
prefs.height = strtoul(optarg, &p, 0);
|
prefs.height = strtol(optarg, &p, 0);
|
||||||
if(optarg[0] == '\0' || *p != '\0')
|
if(optarg[0] == '\0' || *p != '\0')
|
||||||
return _usage();
|
return _usage();
|
||||||
break;
|
break;
|
||||||
|
@ -151,7 +151,7 @@ int main(int argc, char * argv[])
|
||||||
prefs.title = optarg;
|
prefs.title = optarg;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
prefs.width = strtoul(optarg, &p, 0);
|
prefs.width = strtol(optarg, &p, 0);
|
||||||
if(optarg[0] == '\0' || *p != '\0')
|
if(optarg[0] == '\0' || *p != '\0')
|
||||||
return _usage();
|
return _usage();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user