• Alan Coopersmith's avatar
    Fix implicit conversion warnings in _XlcCreateDefaultCharSet · 30656fd6
    Alan Coopersmith authored
    lcCharSet.c:187:50: warning: implicit conversion changes signedness:
          'int' to 'unsigned long' [-Wsign-conversion]
        tmp = Xmalloc(name_len + 1 + ct_sequence_len + 1);
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../../include/X11/Xlibint.h:453:32: note: expanded from macro 'Xmalloc'
                           ~~~~~~  ^~~~
    lcCharSet.c:192:31: warning: implicit conversion changes signedness:
          'int' to 'unsigned long' [-Wsign-conversion]
        memcpy(tmp, name, name_len+1);
        ~~~~~~            ~~~~~~~~^~
    lcCharSet.c:216:45: warning: implicit conversion changes signedness:
          'int' to 'unsigned long' [-Wsign-conversion]
        memcpy(tmp, ct_sequence, ct_sequence_len+1);
        ~~~~~~                   ~~~~~~~~~~~~~~~^~
    lcCharSet.c:183:16: warning: implicit conversion loses integer precision:
          'unsigned long' to 'int' [-Wshorten-64-to-32]
        name_len = strlen(name);
                 ~ ^~~~~~~~~~~~
    lcCharSet.c:184:23: warning: implicit conversion loses integer precision:
          'unsigned long' to 'int' [-Wshorten-64-to-32]
        ct_sequence_len = strlen(ct_sequence);
                        ~ ^~~~~~~~~~~~~~~~~~~
    lcCharSet.c:198:37: warning: implicit conversion loses integer precision:
         'long' to 'unsigned int' [-Wshorten-64-to-32]
            unsigned int length = colon - charset->name;
                         ~~~~~~   ~~~~~~^~~~~~~~~~~~~~~
    Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    30656fd6
Name
Last commit
Last update
include Loading commit data...
m4 Loading commit data...
man Loading commit data...
modules Loading commit data...
nls Loading commit data...
specs Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
cpprules.in Loading commit data...
docbook.am Loading commit data...
x11-xcb.pc.in Loading commit data...
x11.pc.in Loading commit data...