diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-24 10:09:22 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-24 10:09:22 -0700 |
commit | cab5c584f1dcc125a7fd2a014785dc8adcd3c683 (patch) | |
tree | 56e356b4a9ba5922c9d8a8815e5de0c74939c3c6 /xgamma.c | |
parent | 3d05b29e9e1431f11cb2c2cb960380586c6ba494 (diff) |
Fix size/sign conversion warnings in isabbreviation()
clang said:
xgamma.c:85:26: warning: implicit conversion changes signedness: 'int' to
'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (strncmp (arg, s, slen) == 0) return (True);
~~~~~~~ ^~~~
xgamma.c:78:14: warning: implicit conversion loses integer precision: 'size_t'
(aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
arglen = strlen (arg);
~ ^~~~~~~~~~~~
xgamma.c:79:12: warning: implicit conversion loses integer precision: 'size_t'
(aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
slen = strlen (s);
~ ^~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xgamma.c')
-rw-r--r-- | xgamma.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -67,10 +67,10 @@ Syntax(void) */ static Bool -isabbreviation(char *arg, char *s, int minslen) +isabbreviation(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); |