Module: wine Branch: refs/heads/master Commit: 3c0e5eed83ed40db5728b0a2f5d39c4d6d2e01c9 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=3c0e5eed83ed40db5728b0a2...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Mon Feb 6 13:10:18 2006 +0100
A few fixes for pointer qualifiers (const, volatile) warnings.
---
include/winbase.h | 4 ++-- libs/unicode/cptable.c | 2 +- tools/wmc/mcy.y | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/winbase.h b/include/winbase.h index 9a86490..aeee6a0 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2284,7 +2284,7 @@ static inline PVOID WINAPI InterlockedCo : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" ); return ret; #else - return (PVOID)InterlockedCompareExchange( (PLONG)dest, (LONG)xchg, (LONG)compare ); + return (PVOID)InterlockedCompareExchange( (LONG volatile*)dest, (LONG)xchg, (LONG)compare ); #endif }
@@ -2296,7 +2296,7 @@ static inline PVOID WINAPI InterlockedEx : "=r" (ret) :"r" (dest), "0" (val) : "memory" ); return ret; #else - return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val ); + return (PVOID)InterlockedExchange( (LONG volatile*)dest, (LONG)val ); #endif }
diff --git a/libs/unicode/cptable.c b/libs/unicode/cptable.c index 74f7312..4d40c2f 100644 --- a/libs/unicode/cptable.c +++ b/libs/unicode/cptable.c @@ -156,7 +156,7 @@ static const union cptable * const cptab
static int cmp_codepage( const void *codepage, const void *entry ) { - return *(unsigned int *)codepage - (*(const union cptable *const *)entry)->info.codepage; + return *(const unsigned int *)codepage - (*(const union cptable *const *)entry)->info.codepage; }
diff --git a/tools/wmc/mcy.y b/tools/wmc/mcy.y index 3b99e34..557509a 100644 --- a/tools/wmc/mcy.y +++ b/tools/wmc/mcy.y @@ -465,7 +465,7 @@ static msg_t *add_lanmsg(msg_t *msg, lan
static int sort_lanmsg(const void *p1, const void *p2) { - return (*(lanmsg_t **)p1)->lan - (*(lanmsg_t **)p2)->lan; + return (*(const lanmsg_t * const *)p1)->lan - (*(const lanmsg_t * const*)p2)->lan; }
static msg_t *complete_msg(msg_t *mp, int id) @@ -563,7 +563,7 @@ static int check_languages(node_t *head) return nm; }
-#define MSGRID(x) ((*(msg_t **)(x))->realid) +#define MSGRID(x) ((*(const msg_t * const*)(x))->realid) static int sort_msg(const void *p1, const void *p2) { return MSGRID(p1) > MSGRID(p2) ? 1 : (MSGRID(p1) == MSGRID(p2) ? 0 : -1); @@ -653,7 +653,7 @@ static lan_blk_t *block_messages(node_t
static int sc_xlat(const void *p1, const void *p2) { - return ((cp_xlat_t *)p1)->lan - ((cp_xlat_t *)p2)->lan; + return ((const cp_xlat_t *)p1)->lan - ((const cp_xlat_t *)p2)->lan; }
static void add_cpxlat(int lan, int cpin, int cpout)