|
From: | Paul Rockwell |
Subject: | Re: I get ompile errors in 1788 |
Date: | Thu, 26 Sep 2024 23:40:29 -0400 |
Peter, I've seen these warnings in Quad_PNG.cc - they appear to be harmless. I've re-written the definitions of both PNG_GTK and PNG_LIBS so that they are no longer flagged by the compiler as potentially undefined behavior and probably are considered to be better practice: I've copied a diff of my code vs that in SVN 1780 created via 'svn diff': I've seen the warnings in filter_apl_lines.cc that appear to be typecasting mismatches. I haven't seen the warnings out of lines.cc. - Paul Rockwell Index: src/Quad_PNG.cc =================================================================== --- src/Quad_PNG.cc (revision 1780) +++ src/Quad_PNG.cc (working copy) @@ -41,18 +41,24 @@
/// PNG_GTK defines whether ⎕PNG B with ⍴⍴B ←→ 3 (display of a PNG file in a /// GTK window shall be supported, Requires libgtk in addition to libnpng. -#define PNG_GTK \ - apl_X11 && \ +#if apl_X11 && \ defined( apl_GTK3 ) && \ - defined( HAVE_LIBGTK_3 ) + defined( HAVE_LIBGTK_3 ) +#define PNG_GTK 1 +#else +#define PNG_GTK 0 +#endif
/// PNG_LIBS defines if the PNG related libraries (and their header files) /// are present -#define PNG_LIBS \ - defined( HAVE_LIBZ ) && \ +#if defined( HAVE_LIBZ ) && \ defined( HAVE_ZLIB_H ) && \ defined( HAVE_LIBPNG ) && \ defined( HAVE_LIBPNG16_PNG_H ) +#define PNG_LIBS 1 +#else +$define PNG_LIBS 0 +#endif
#if PNG_LIBS # include <zlib.h>
|
[Prev in Thread] | Current Thread | [Next in Thread] |