Declare 'len' as size_t to avoid unneccessary back-and-forth conversions
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 22 Jan 2013 07:03:48 +0000 (23:03 -0800)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 22 Jan 2013 07:03:48 +0000 (23:03 -0800)
commitf407231c855bc0349d0f8543a9dfe9dff4b2508b
tree1756be88468206df4fff11769d614ca1c74f7589
parentee596f7f67b203d04974fce16deadfcd122d0441
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>
xdpyinfo.c