Skip to content
  • Alan Coopersmith's avatar
    Preserve constness in casting arguments through the Data*() routines · f0b171c8
    Alan Coopersmith authored
    
    
    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: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    f0b171c8