From e37fd2c51f4e82a2fdaa5a9d95b89f0bab390cce Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Sat, 1 Oct 2011 14:15:35 +0000 Subject: [PATCH] Fixed unconst() types. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3696 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/libs/misc.h | 4 ++-- sc2/src/libs/uio/uioutils.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index fc2be7fcd..cf1e52eda 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.8: +- Fixed unconst(), from Scott A. Colcord - Fixes to a few small bugs in UIO which shouldn't have had an impact on UQM, but would in the future, from Alex - Allow F6 as a default alternate search key, from related projects. diff --git a/sc2/src/libs/misc.h b/sc2/src/libs/misc.h index 56fbc222f..39333a220 100644 --- a/sc2/src/libs/misc.h +++ b/sc2/src/libs/misc.h @@ -51,8 +51,8 @@ static inline void explode (void) static inline void * unconst(const void *arg) { union { - char *c; - const char *cc; + void *c; + const void *cc; } u; u.cc = arg; return u.c; diff --git a/sc2/src/libs/uio/uioutils.h b/sc2/src/libs/uio/uioutils.h index 309cc1681..d64cb584b 100644 --- a/sc2/src/libs/uio/uioutils.h +++ b/sc2/src/libs/uio/uioutils.h @@ -44,8 +44,8 @@ char *dosToUnixPath(const char *path); static inline void * unconst(const void *arg) { union { - char *c; - const char *cc; + void *c; + const void *cc; } u; u.cc = arg; return u.c;