sane-project-website/old-archive/2000-08/0068.html

326 wiersze
9.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Warnings during build</TITLE>
<META NAME="Author" CONTENT="Dave Hill (dave@minnie.demon.co.uk)">
<META NAME="Subject" CONTENT="Re: Warnings during build">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Warnings during build</H1>
<!-- received="Tue Aug 8 06:22:59 2000" -->
<!-- isoreceived="20000808132259" -->
<!-- sent="Tue, 08 Aug 2000 12:59:58 +0100" -->
<!-- isosent="20000808115958" -->
<!-- name="Dave Hill" -->
<!-- email="dave@minnie.demon.co.uk" -->
<!-- subject="Re: Warnings during build" -->
<!-- id="398FF63E.3F28AA95@minnie.demon.co.uk" -->
<!-- inreplyto="20000807213516.A15865@hmg1.vortex.swb.de" -->
<STRONG>From:</STRONG> Dave Hill (<A HREF="mailto:dave@minnie.demon.co.uk?Subject=Re:%20Warnings%20during%20build&In-Reply-To=&lt;398FF63E.3F28AA95@minnie.demon.co.uk&gt;"><EM>dave@minnie.demon.co.uk</EM></A>)<BR>
<STRONG>Date:</STRONG> Tue Aug 08 2000 - 04:59:58 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0069.html">Jonathan P. Dietrich: "Re: insane sane problems :)"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0067.html">Jean-Charles de Longueville: "Re: insane sane problems :)"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0060.html">Henning Meier-Geinitz: "Re: Warnings during build"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0077.html">Petter Reinholdtsen: "Re: Warnings during build"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#68">[ date ]</A>
<A HREF="index.html#68">[ thread ]</A>
<A HREF="subject.html#68">[ subject ]</A>
<A HREF="author.html#68">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Henning Meier-Geinitz wrote:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Hi,
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; On Mon, Aug 07, 2000 at 05:00:58PM +0100, Dave Hill wrote:
</EM><BR>
<P>[snip]
<BR>
<P><EM>&gt; &gt; This is with the warnings turned
</EM><BR>
<EM>&gt; &gt; down (if I try to build with the warnings turned up, it fails!).
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; This shouldn't happen. Where does it fail? Could you send the output of make
</EM><BR>
<EM>&gt; (or whatever fails)?
</EM><BR>
<EM>&gt;
</EM><BR>
<P>It fails whilst compiling &quot;canon.c&quot;. The compiler is:-
<BR>
$ gcc -v
<BR>
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
<BR>
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
<BR>
<P>This is what happens:-
<BR>
<P>gcc -c -g -O2 -W -Wall -Wstrict-prototypes -Wreturn-type -Wcast-align
<BR>
-Wpointer-arith -Wcast-qual -ansi -pedantic -DSCSIBUFFERSIZE=131072
<BR>
-DHAVE_CONFIG_H -I. -I. -I../include -I../include -D_GNU_SOURCE
<BR>
-DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share/sane
<BR>
-DV_MAJOR=1 -DV_MINOR=0 -DBACKEND_NAME=canon -DLIBDIR=/usr/lib/sane
<BR>
canon.c -fPIC -DPIC -o .libs/canon.lo
<BR>
In file included from ../include/sane/sanei_backend.h:1,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from canon.c:105:
<BR>
../include/sane/sanei_debug.h:46: warning: ANSI C does not allow macro
<BR>
with variable arguments
<BR>
/usr/include/bits/mathinline.h: In function `__signbitf':
<BR>
In file included from /usr/include/math.h:348,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from canon.c:97:
<BR>
/usr/include/bits/mathinline.h:117: warning: ANSI C forbids specifying
<BR>
structure member to initialize
<BR>
/usr/include/bits/mathinline.h:117: initializer element for `__u.__f' is
<BR>
not computable at load time
<BR>
/usr/include/bits/mathinline.h: In function `__signbit':
<BR>
/usr/include/bits/mathinline.h:122: warning: ANSI C forbids specifying
<BR>
structure member to initialize
<BR>
/usr/include/bits/mathinline.h:122: initializer element for `__u.__d' is
<BR>
not computable at load time
<BR>
/usr/include/bits/mathinline.h: In function `__signbitl':
<BR>
/usr/include/bits/mathinline.h:127: warning: ANSI C forbids specifying
<BR>
structure member to initialize
<BR>
/usr/include/bits/mathinline.h:127: initializer element for `__u.__l' is
<BR>
not computable at load time
<BR>
canon-scsi.c: In function `define_scan_mode':
<BR>
In file included from canon.c:181:
<BR>
canon-scsi.c:382: warning: comparison between signed and unsigned
<BR>
canon-scsi.c: In function `set_density_curve':
<BR>
canon-scsi.c:445: warning: unused parameter `buf_size'
<BR>
canon.c: In function `get_tpu_stat':
<BR>
canon.c:231: warning: comparison between signed and unsigned
<BR>
canon.c: In function `get_adf_stat':
<BR>
canon.c:285: warning: comparison between signed and unsigned
<BR>
canon.c: In function `attach':
<BR>
canon.c:599: warning: comparison between signed and unsigned
<BR>
canon.c: In function `adjust_hilo_points':
<BR>
canon.c:1128: warning: comparison between signed and unsigned
<BR>
canon-sane.c: In function `sane_canon_init':
<BR>
In file included from canon.c:1937:
<BR>
canon-sane.c:4: warning: unused parameter `authorize'
<BR>
canon-sane.c: In function `sane_canon_exit':
<BR>
canon-sane.c:54: warning: cast discards `const' from pointer target type
<BR>
canon-sane.c:55: warning: cast discards `const' from pointer target type
<BR>
canon-sane.c: In function `sane_canon_get_devices':
<BR>
canon-sane.c:65: warning: unused parameter `local_only'
<BR>
canon-sane.c: In function `sane_canon_control_option':
<BR>
canon-sane.c:601: warning: pointer of type `void *' used in arithmetic
<BR>
<P>[snip more of these]
<BR>
<P>canon-sane.c: In function `sane_canon_start':
<BR>
canon-sane.c:1070: warning: comparison between signed and unsigned
<BR>
canon-sane.c:1086: warning: comparison between signed and unsigned
<BR>
canon-sane.c:1296: warning: comparison between signed and unsigned
<BR>
canon-sane.c: In function `sane_canon_set_io_mode':
<BR>
canon-sane.c:1395: warning: unused parameter `handle'
<BR>
canon-sane.c:1395: warning: unused parameter `non_blocking'
<BR>
canon-sane.c: In function `sane_canon_get_select_fd':
<BR>
canon-sane.c:1406: warning: unused parameter `handle'
<BR>
canon-sane.c:1406: warning: unused parameter `fd'
<BR>
make[1]: *** [canon.lo] Error 1
<BR>
make[1]: Leaving directory
<BR>
`/home/src/redhat/BUILD/sane-1.0.2_20000806/backend'
<BR>
make: *** [all-recursive] Error 1
<BR>
<P>I think that the problem is with the include files, rather than the
<BR>
actual backend itself, as all it does is to #include &lt;math.h&gt;!
<BR>
<P>The code in &lt;math.h&gt; says:-
<BR>
<P>/* Get machine-dependent inline versions (if there are any). */
<BR>
#ifdef __USE_EXTERN_INLINES
<BR>
# include &lt;bits/mathinline.h&gt;
<BR>
#endif
<BR>
<P>and __USE_EXTERN_INLINES is set in &lt;features.h&gt; like this:-
<BR>
<P>/* Decide whether we can define 'extern inline' functions in headers.
<BR>
*/
<BR>
#if defined __GNUC__ &amp;&amp; (__GNUC__ &gt; 2 || __GNUC__ == 2 &amp;&amp; __GNUC_MINOR__
<BR>
<EM>&gt;= 7)\
</EM><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; defined __OPTIMIZE__ &amp;&amp; !defined __OPTIMIZE_SIZE__
<BR>
# define __USE_EXTERN_INLINES 1
<BR>
#endif
<BR>
<P>Obviously the code in &lt;bits/mathinline.h&gt; has trouble when &quot;-ansi
<BR>
-pedantic&quot; is used! The code is this:-
<BR>
<P>#if defined __USE_ISOC9X &amp;&amp; defined __GNUC__ &amp;&amp; __GNUC__ &gt;= 2
<BR>
<P>[snip other defines]
<BR>
<P>/* Test for negative number. Used in the signbit() macro. */
<BR>
__MATH_INLINE int
<BR>
__signbitf (float __x)
<BR>
{
<BR>
&nbsp;&nbsp;union { float __f; int __i; } __u = { __f: __x }; return __u.__i &lt; 0;
<BR>
}
<BR>
__MATH_INLINE int
<BR>
__signbit (double __x)
<BR>
{
<BR>
&nbsp;&nbsp;union { double __d; int __i[2]; } __u = { __d: __x }; return
<BR>
__u.__i[1] &lt; 0;
<BR>
}
<BR>
__MATH_INLINE int
<BR>
__signbitl (long double __x)
<BR>
{
<BR>
&nbsp;&nbsp;union { long double __l; int __i[3]; } __u = { __l: __x };
<BR>
&nbsp;&nbsp;return (__u.__i[2] &amp; 0x8000) != 0;
<BR>
}
<BR>
#endif
<BR>
<P>&lt;math.h&gt; is also used in coolscan.c, dc25.c, hp-option.c, microtek.c,
<BR>
microtek2.c, mustek_pp.c, qcam.c, sharp.c, snapscan.c, umax.c and
<BR>
v4l.c, plus preview.c and xscanimage.c.
<BR>
<P>Any ideas, anyone??
<BR>
<P>Dave
<BR>
<P><PRE>
--
Dave Hill, Kempston, Bedford UK <A HREF="mailto:dave@minnie.demon.co.uk?Subject=Re:%20Warnings%20during%20build&In-Reply-To=&lt;398FF63E.3F28AA95@minnie.demon.co.uk&gt;">dave@minnie.demon.co.uk</A>
davehill at users.sourceforge.net
Sicth munce ago, I cutn't evun spel enjuneer, and now I are one!
<P>--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Warnings%20during%20build&In-Reply-To=&lt;398FF63E.3F28AA95@minnie.demon.co.uk&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0069.html">Jonathan P. Dietrich: "Re: insane sane problems :)"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0067.html">Jean-Charles de Longueville: "Re: insane sane problems :)"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0060.html">Henning Meier-Geinitz: "Re: Warnings during build"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0077.html">Petter Reinholdtsen: "Re: Warnings during build"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#68">[ date ]</A>
<A HREF="index.html#68">[ thread ]</A>
<A HREF="subject.html#68">[ subject ]</A>
<A HREF="author.html#68">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Tue Aug 08 2000 - 06:24:28 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>