summaryrefslogtreecommitdiffstats
path: root/src/libuemf
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-26 01:00:24 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-26 01:00:24 +0000
commita5c919f46c359f26433cb42a82bb99fbb729a467 (patch)
treea9d00aafdfa2cb160257d25ebeae78f6a6d6ca30 /src/libuemf
parenttiny bugfix for Taper Strokes (diff)
parentmake it easier for people to build with -Werror on Windows (diff)
downloadinkscape-a5c919f46c359f26433cb42a82bb99fbb729a467.tar.gz
inkscape-a5c919f46c359f26433cb42a82bb99fbb729a467.zip
Update to trunk
Massive cleanup of outlining code (bzr r13090.1.31)
Diffstat (limited to 'src/libuemf')
-rw-r--r--src/libuemf/uemf_endian.c7
-rw-r--r--src/libuemf/uemf_utf.c7
-rw-r--r--src/libuemf/uwmf_endian.c8
3 files changed, 16 insertions, 6 deletions
diff --git a/src/libuemf/uemf_endian.c b/src/libuemf/uemf_endian.c
index f025416c3..f5dcf829a 100644
--- a/src/libuemf/uemf_endian.c
+++ b/src/libuemf/uemf_endian.c
@@ -36,6 +36,10 @@ extern "C" {
#include "uemf.h"
#include "uemf_endian.h"
+// Unfortunately, C does not allow unnamed function arguments, so use this macro instead...
+#define UNUSED(x) (void)(x)
+
+
// hide almost everuything in here from Doxygen
//! \cond
@@ -425,7 +429,8 @@ by end user code and to further that end prototypes are NOT provided and they ar
// all core*_swap call this, U_EMRSETMARGN_swap and some others all it directly
// numbered as core5 to be consistent with uemf.c, but must appear before the others as there is no prototype
void core5_swap(char *record, int torev){
- torev = torev; // shuts up compiler warnings about unused parameters
+ UNUSED(torev);
+
PU_ENHMETARECORD pEMR = (PU_ENHMETARECORD)(record);
U_swap4(pEMR,2); // iType nSize
}
diff --git a/src/libuemf/uemf_utf.c b/src/libuemf/uemf_utf.c
index bce60af4d..0c07148a4 100644
--- a/src/libuemf/uemf_utf.c
+++ b/src/libuemf/uemf_utf.c
@@ -49,11 +49,14 @@ void U_swap2(void *ul, unsigned int count);
on another funky system this code may need to be modified, or define ICONV_CAST
on the compile line(but it may be tricky).
*/
+#if _LIBICONV_VERSION == 0x0109
+# define ICONV_CAST (const char **)
+#endif // _LIBICONV_VERSION 0x0109
#ifdef SOL8
-#define ICONV_CAST (const char **)
+# define ICONV_CAST (const char **)
#endif //SOL8
#if !defined(ICONV_CAST)
-#define ICONV_CAST (char **)
+# define ICONV_CAST (char **)
#endif //ICONV_CAST
/** \endcond */
diff --git a/src/libuemf/uwmf_endian.c b/src/libuemf/uwmf_endian.c
index 6caa24d8f..5fbb450dc 100644
--- a/src/libuemf/uwmf_endian.c
+++ b/src/libuemf/uwmf_endian.c
@@ -24,6 +24,8 @@ extern "C" {
#include "uwmf.h"
#include "uwmf_endian.h"
+#define UNUSED(x) (void)(x)
+
// hide almost everything in this file from Doxygen
//! \cond
/* Prototypes for functions used here and defined in uemf_endian.c, but which are not supposed
@@ -282,7 +284,7 @@ by end user code and to further that end prototypes are NOT provided and they ar
/* Size16 EVERY record type should call this, directly or indirectly*/
void U_WMRCORE_SIZE16_swap(char *record, int torev){
- torev = torev; // shuts up compiler warnings about unused parameters
+ UNUSED(torev);
U_swap4(record, 1); /* Size16_4 is at offset 0 in U_METARECORD */
}
@@ -307,7 +309,7 @@ void U_WMRCORE_U16_N16_swap(char *record, int torev){
/* all records that specify palette objects */
void U_WMRCORE_PALETTE_swap(char *record, int torev){
- torev = torev; // shuts up compiler warnings about unused parameters
+ UNUSED(torev);
U_WMRCORE_SIZE16_swap(record, torev);
palette_swap(record + offsetof(U_WMRANIMATEPALETTE,Palette));
}
@@ -700,7 +702,7 @@ void U_WMRDIBCREATEPATTERNBRUSH_swap(char *record, int torev){
}
void U_WMRSTRETCHDIB_swap(char *record, int torev){
- torev = torev;
+ UNUSED(torev);
U_WMRCORE_U32_N16_swap(record,9,torev);
dibheader_swap(record + offsetof(U_WMRSTRETCHDIB,dib), torev);
}