diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-04 18:21:23 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-04 18:23:19 -0800 |
commit | 98f941d218108a314f979332b19c612f51ace08d (patch) | |
tree | cf86841a3a07db0496dc4cb9ede3e5d2d3da72cd | |
parent | 60d4a9dc01c9a1bf7a29c4a64ad52a6e27307682 (diff) |
Fix implicit conversion from size_t to int warnings in Deiconified()
xconsole.c:423:14: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
oldlen = strlen (oldName);
~ ^~~~~~~~~~~~~~~~
xconsole.c:426:27: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
newName = malloc (oldlen - 1);
~~~~~~ ~~~~~~~^~~
xconsole.c:429:36: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
strncpy (newName, oldName, oldlen - 2);
~~~~~~~ ~~~~~~~^~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xconsole.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -413,7 +413,7 @@ Deiconified(Widget widget, XEvent *event, String *params, Cardinal *num_params) Arg arglist[1]; char *oldName; char *newName; - int oldlen; + size_t oldlen; iconified = False; if (!app_resources.notify || !notified) |