diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-18 20:25:53 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-18 20:26:37 -0700 |
commit | 25b41a35484ba4db23627e57d105b7156c19816f (patch) | |
tree | 9f97a929e8ba78ee965c9adae1f76dcec8faafc6 | |
parent | de3301ff61c1f7c5d14265ae9bab9917244568ad (diff) |
Fix some size/sign conversion warnings from clang
xclipboard.c:108:27: warning: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
clip->clip = malloc (len + 1);
~~~~~~ ~~~~^~~
xclipboard.c:103:11: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = strlen (data);
~ ^~~~~~~~~~~~~
xclipboard.c:331:15: warning: implicit conversion loses integer precision:
'int' to 'Boolean' (aka 'char') [-Wconversion]
success = XawAsciiSaveAsFile (XawTextGetSource (text), filename);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xclipboard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xclipboard.c b/xclipboard.c index 4846e80..f5fdd18 100644 --- a/xclipboard.c +++ b/xclipboard.c @@ -67,7 +67,7 @@ typedef struct _Clip { struct _Clip *next, *prev; char *clip; char *filename; - int avail; + size_t avail; } ClipRec, *ClipPtr; static Atom wm_delete_window; @@ -94,7 +94,7 @@ SaveClip(Widget w, ClipPtr clip) { Arg args[1]; char *data; - int len; + size_t len; Widget source; source = XawTextGetSource (w); @@ -324,7 +324,7 @@ static void AcceptSaveFile(Widget w, XEvent *e, String *argv, Cardinal *argc) { char *filename; - Boolean success; + Bool success; Arg args[1]; filename = XawDialogGetValueString (fileDialog); |