• Alan Coopersmith's avatar
    xcms: use size_t for strlen/sizeof values instead of converting to int & back · 327d2cc6
    Alan Coopersmith authored
    Fixes gcc warnings of the form:
    
    IdOfPr.c: In function ‘XcmsFormatOfPrefix’:
    IdOfPr.c:69:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if ((len = strlen(prefix)) >= sizeof(string_buf)) {
                                    ^
    IdOfPr.c:83:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (len >= sizeof(string_buf)) Xfree(string_lowered);
               ^
    IdOfPr.c:97:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (len >= sizeof(string_buf)) Xfree(string_lowered);
               ^
    IdOfPr.c:104:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (len >= sizeof(string_buf)) Xfree(string_lowered);
                 ^
    Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
    327d2cc6
IdOfPr.c 2.89 KB