libXau: Changes to 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Fri Dec 21 18:54:02 PST 2012


 AuFileName.c        |    6 +++---
 AuRead.c            |    4 ++--
 AuWrite.c           |    4 ++--
 include/X11/Xauth.h |   12 ++++++++++++
 4 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit e04364efccbb3bb4cfc5f4cb491ffa1faaaacbdb
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Dec 16 15:50:52 2012 -0800

    Tell clang to shut up about the padding in struct xauth
    
    We can't clean it up without breaking ABI, so disable the warnings for it:
    
    ./include/X11/Xauth.h:33:19: warning: padding struct 'struct xauth' with 4 bytes to align 'address' [-Wpadded]
        char            *address;
                         ^
    ./include/X11/Xauth.h:35:19: warning: padding struct 'struct xauth' with 6 bytes to align 'number' [-Wpadded]
        char            *number;
                         ^
    ./include/X11/Xauth.h:37:19: warning: padding struct 'struct xauth' with 6 bytes to align 'name' [-Wpadded]
        char            *name;
                         ^
    ./include/X11/Xauth.h:39:18: warning: padding struct 'struct xauth' with 6 bytes to align 'data' [-Wpadded]
        char            *data;
                         ^
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

commit 4d43b4554f8e35bf8122ae9d2f1bbc0e56fe6d37
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Dec 16 15:40:30 2012 -0800

    Clean up some clang warnings about sign conversion
    
    fread & fwrite are defined as taking size_t arguments (an unsigned type),
    so stop casting their arguments to a signed int just to confuse things.
    
    Fixes warnings:
    
    AuFileName.c:69:59: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
        size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
             ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
    
    AuRead.c:58:44: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
            if (fread (data, (int) sizeof (char), (int) len, file) != len) {
                ~~~~~                             ^~~~~~~~~
    
    AuWrite.c:49:46: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
        if (fwrite (string, (int) sizeof (char), (int) count, file) != count)
            ~~~~~~                               ^~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>



More information about the xorg-commit mailing list