diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-13 08:37:49 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-13 08:37:49 -0800 |
commit | 865c7c3da3a827cff080a763613d02729e9d4e33 (patch) | |
tree | 10accd1819c0fa641fab33e240671e15a5d7e486 | |
parent | 4fa0dd48d6c9fcd54276a66c221fdafda2395c02 (diff) |
Fix implicit sign conversion & integer size truncation warnings
xrefresh.c:125:14: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
arglen = strlen (arg);
~ ^~~~~~~~~~~~
xrefresh.c:126:12: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
slen = strlen (s);
~ ^~~~~~~~~~
xrefresh.c:132:26: warning: implicit conversion changes signedness: 'int' to
'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (strncmp (arg, s, slen) == 0) return (True);
~~~~~~~ ^~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xrefresh.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -114,10 +114,10 @@ parse_boolean_option(char *option) */ static Bool -isabbreviation(const char *arg, char *s, int minslen) +isabbreviation(const char *arg, char *s, size_t minslen) { - int arglen; - int slen; + size_t arglen; + size_t slen; /* exact match */ if (strcmp (arg, s) == 0) return (True); |