libX11: Changes to 'master'
Alan Coopersmith
alanc at kemper.freedesktop.org
Fri Feb 22 19:30:31 PST 2013
include/X11/Xlibint.h | 16 ++++++++--------
src/ChProp.c | 6 +++---
src/ErrDes.c | 9 +++++----
src/GetDflt.c | 2 +-
src/KeyBind.c | 2 +-
src/KeysymStr.c | 26 +++++++++++---------------
src/SetHints.c | 4 +++-
src/SetPntMap.c | 2 +-
src/StBytes.c | 2 +-
src/StName.c | 6 +++---
src/StrKeysym.c | 2 +-
src/XlibInt.c | 20 ++++++++++----------
src/xcms/cmsColNm.c | 2 +-
13 files changed, 49 insertions(+), 50 deletions(-)
New commits:
commit b687440c28c7da6ee0ae44514d20248db5161606
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Feb 16 10:42:23 2013 -0800
Convert more sprintf calls to snprintf
You could analyze most of these and quickly recognize that there was no
chance of buffer overflow already, but why make everyone spend time doing
that when we can just make it obviously safe?
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
commit b092dabbd712d7b656abcf572d253b9b206c0237
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Feb 15 23:43:12 2013 -0800
XKeysymToString: move variable declarations to the scope of their usage
Makes it easier for readers to understand scope of variable usage, and
clears up gcc warning:
KeysymStr.c: In function 'XKeysymToString':
KeysymStr.c:128:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
KeysymStr.c:73:18: warning: shadowed declaration is here [-Wshadow]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
commit f0b171c8ea7b055ba520272ea9a2604e18841ac7
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Feb 15 23:34:40 2013 -0800
Preserve constness in casting arguments through the Data*() routines
Casts were annoying gcc by dropping constness when changing types,
when routines simply either copy data into the request buffer or
send it directly to the X server, and never modify the input.
Fixes gcc warnings including:
ChProp.c: In function 'XChangeProperty':
ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:83:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetHints.c: In function 'XSetStandardProperties':
SetHints.c:262:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetPntMap.c: In function 'XSetPointerMapping':
SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StBytes.c: In function 'XStoreBuffer':
StBytes.c:97:33: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StName.c: In function 'XStoreName':
StName.c:40:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StName.c: In function 'XSetIconName':
StName.c:51:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
commit 6c558ee357292dd9dfc6d9006f4525f625327c52
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Feb 15 22:58:54 2013 -0800
Fix comment typo & confusing indentation levels in Data() macro definition
The final } matches the one on the #define line, not one that doesn't
appear after the else statement it was lined up with
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
commit afd6593da90e51234d59f8921c411317f91ab48b
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Feb 15 23:25:38 2013 -0800
XStringToKeysym: preserve constness when casting off unsignedness for strcmp
Fixes gcc warning:
StrKeysym.c:97:17: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
commit 7e3bf4dd83fec22bd568146de75e6d59eff74e21
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Feb 15 23:14:40 2013 -0800
XRebindKeysym: Drop unnecessary const-removing cast
C89 defines memcpy as taking a const void *, so casting from
const unsigned char * to char * simply angers gcc for no benefit:
KeyBind.c:1017:24: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
commit 54527eab93d46055cf11eb6c18abb353a03ae544
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Feb 15 22:45:19 2013 -0800
cmsColNm.c: maintain constness of arguments to qsort helper function
Fixes gcc warning:
cmsColNm.c: In function 'FirstCmp':
cmsColNm.c:257:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
cmsColNm.c:257:45: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
More information about the xorg-commit
mailing list