Skip to content
  • Alan Coopersmith's avatar
    dmx: fix printf format argument warnings · f358f0d5
    Alan Coopersmith authored
    
    
    Gets rid of these gcc 4.8 warnings:
    
    dmxinit.c: In function ‘dmxErrorHandler’:
    dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
     but argument 3 has type ‘XID64’ [-Wformat=]
                    ev->resourceid);
                    ^
    dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
     but argument 3 has type ‘XID64’ [-Wformat=]
                    ev->resourceid);
                    ^
    dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
     but argument 3 has type ‘XID64’ [-Wformat=]
                    ev->resourceid);
                    ^
    dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’,
     but argument 3 has type ‘long unsigned int’ [-Wformat=]
                ev->serial);
                ^
    dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’,
     but argument 3 has type ‘long unsigned int’ [-Wformat=]
                dpy->request);
                ^
    dmxinit.c: In function ‘InitOutput’:
    dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’,
     but argument 3 has type ‘long unsigned int’ [-Wformat=]
             dmxLog(dmxInfo, "Generation:         %d\n", dmxGeneration);
             ^
    
    dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’:
    dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long
     unsigned int’, but argument 4 has type ‘Window’ [-Wformat=]
                            dmxScreen->name, win, tp.value);
                            ^
    dmxprop.c: In function ‘dmxPropertyWindow’:
    dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
     unsigned int’, but argument 5 has type ‘Window’ [-Wformat=]
                    other->index, other->name, other->scrnWin);
                    ^
    dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
     unsigned int’, but argument 8 has type ‘Window’ [-Wformat=]
    
    Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
    Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
    f358f0d5