Hi tech@
While trying to build a kernel with option DEBUG, I came across the
following errors:
cc1: warnings being treated as errors
../../../../lib/libz/deflate.c: In function 'check_match':
../../../../lib/libz/deflate.c:1238: warning: implicit declaration of
function 'fprintf'
../../../../lib/libz/deflate.c:1238: warning: incompatible implicit
declaration of built-in function 'fprintf'
../../../../lib/libz/deflate.c:1238: error: 'stderr' undeclared (first
use in this function)
../../../../lib/libz/deflate.c:1238: error: (Each undeclared identifier
is reported only once
../../../../lib/libz/deflate.c:1238: error: for each function it appears
in.)
../../../../lib/libz/deflate.c:1243: warning: implicit declaration of
function 'z_error'
../../../../lib/libz/deflate.c:1245: error: 'z_verbose' undeclared
(first use in this function)
../../../../lib/libz/deflate.c:1246: warning: incompatible implicit
declaration of built-in function 'fprintf'
../../../../lib/libz/deflate.c:1247: warning: implicit declaration of
function 'putc'
*** Error code 1
The following diff fixes the z_verbose issue:
--- deflate.c Fri Jul 15 23:46:43 2011
+++ mydeflate.c Fri Jul 15 23:33:10 2011
@@ -1227,6 +1227,11 @@
/*
===========================================================================
* Check that the match at match_start is indeed a match.
*/
+# ifndef verbose
+# define verbose 0
+# endif
+int z_verbose = verbose;
+
local void check_match(s, start, match, length)
deflate_state *s;
IPos start, match;
But I was not sure how to add in the include for fprintf, stderr, and putc.
Any clues would be appreciated.
Thanks
Fred