G'day,

I've been able to get closer to a working IM/CD/IUP build on a
GNU/Linux Mint system, but I'm still working on major improvements
to my improvised tools for automating fetch/unpack/patch/build etc
operations, and also continuing to evaluate the companion script to
look for diagnostics and report them in an easier-to-read format.

Here is a single, simple patch that takes out a small paragraph of
code that does some sanity checking on the big/little endianness of
the machine, checking that the macro definition matches the results
of a short paragraph involving a union ('n').  The macro NDEBUG is
the usual way to suppress assert, so the preprocessor test is set
up such that the code is run only if NDEBUG isn't defined.

cheers,

s-b etc.
[200~Index: src/libtiff/tif_open.c
===================================================================
--- src/libtiff/tif_open.c	(revision 711)
+++ src/libtiff/tif_open.c	(working copy)
@@ -99,6 +99,12 @@
 	assert(sizeof(uint64)==8);
 	assert(sizeof(int64)==8);
 	assert(sizeof(tmsize_t)==sizeof(void*));
+	/* If assert is a no-op, newer compilers complain that 'n' is
+	 * set but not used.  The canonical way to define assert as a
+	 * no-op is by defining NDEBUG before <assert.h> is included
+	 * (e.g. "-DNDEBUG" on compiler invocation), so we test NDEBUG
+	 * here. */
+	#ifndef NDEBUG
 	{
 		union{
 			uint8 a8[2];
@@ -112,6 +118,7 @@
 		assert(n.a16==1);
 		#endif
 	}
+	#endif /* ndef NDEBUG */
 
 	m = _TIFFgetMode(mode, module);
 	if (m == -1)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to