libFS: Changes to 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Fri Jan 10 22:20:18 PST 2014


 configure.ac              |    3 
 include/X11/fonts/FSlib.h |    4 -
 src/FSErrDis.c            |    5 +
 src/FSOpenServ.c          |    3 
 src/FSlibInt.c            |  144 ++--------------------------------------------
 src/FSlibint.h            |    4 -
 6 files changed, 19 insertions(+), 144 deletions(-)

New commits:
commit e5be46eceee9c0c0d5f0363d3e08b19f86f85fcb
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 23:07:12 2014 -0800

    Use strlcpy instead of strcpy/strncpy if it is available
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit e831ef9246684298c147f9b26de0810b8218c3cb
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 21:33:10 2014 -0800

    Replace malloc(strlen + 1); strcpy() with strdup()
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

commit 980cf8ac0c636ff7ef1fccb9e74f116ac5ea34ae
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 21:13:30 2014 -0800

    Remove unused internal helper _FSWireToEvent
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Seems to have been imported from XlibInt.c without ever being used.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:753]: (style) The function '_FSWireToEvent' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

commit b9f27dc863c3ca01bb231ee48e84bc60b39d4f1f
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 20:55:33 2014 -0800

    Remove unused internal helper _FSEventsQueued
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Seems to have been imported from XlibInt.c without ever being used.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:180]: (style) The function '_FSEventsQueued' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

commit 37772516acb95b3c9934252994b7dfdc147dfd23
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 20:50:32 2014 -0800

    Remove unused internal helper _FSAllocScratch
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Seems to have been imported from XlibInt.c without ever being used.
    The _FSserver fields that it used (and nothing else did) are replaced
    with "unused" placeholders to maintain struct layout/size.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:973]: (style) The function '_FSAllocScratch' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

commit ac1eb6e3ea54724cf3ab3ad1ccf0595df9e34786
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 20:46:48 2014 -0800

    Remove unused internal helper _FSGetHostname
    
    Since we build with -export-symbols-regex '^FS.*', it wasn't available
    to callers outside libFS, and was never called by anything inside libFS.
    
    Xtrans provides it's own exact copy of this function, which gets
    the name _FSTransGetHostname when built in libFS, nothing in libFS
    outside the Xtrans code calls a gethostname() function.
    
    Flagged by cppcheck 1.62:
    [FSlibInt.c:1060]: (style) The function '_FSGetHostname' is never used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

commit a4c12fe0ca5cb359bffe08b26a92ddcf8e194441
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Jan 3 20:04:33 2014 -0800

    If EAGAIN == EWOULDBLOCK, only need to check errno for one of them
    
    Solaris <sys/errno.h> has:
     #define EWOULDBLOCK       EAGAIN
    so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill.
    
    This leads cppcheck 1.62 to complain:
    [FSlibInt.c:153] -> [FSlibInt.c:153]: (style) Same expression on both sides of '||'.
    [FSlibInt.c:301] -> [FSlibInt.c:301]: (style) Same expression on both sides of '||'.
    [FSlibInt.c:379] -> [FSlibInt.c:379]: (style) Same expression on both sides of '||'.
    [FSlibInt.c:472] -> [FSlibInt.c:472]: (style) Same expression on both sides of '||'.
    
    This quiets it, and reduces the number of calls Solaris Studio cc
    generates to the __errno() function to get the thread-specific errno value.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>



More information about the xorg-commit mailing list