diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-21 23:03:48 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-21 23:03:48 -0800 |
commit | f407231c855bc0349d0f8543a9dfe9dff4b2508b (patch) | |
tree | 1756be88468206df4fff11769d614ca1c74f7589 /README | |
parent | ee596f7f67b203d04974fce16deadfcd122d0441 (diff) |
Declare 'len' as size_t to avoid unneccessary back-and-forth conversions
Fixes clang warnings:
xdpyinfo.c:1463:12: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
int len = strlen(arg);
~~~ ^~~~~~~~~~~
xdpyinfo.c:1465:32: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (!strncmp("-display", arg, len)) {
~~~~~~~ ^~~
xdpyinfo.c:1468:47: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
} else if (!strncmp("-queryExtensions", arg, len)) {
~~~~~~~ ^~~
xdpyinfo.c:1470:35: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
} else if (!strncmp("-ext", arg, len)) {
~~~~~~~ ^~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions