From: "=?utf-8?q?S=2E=C3=87a=C4=9Flar?= Onur" Subject: [PATCH] the address of 'symbols_addresses' will always evaluate as 'true' Date: Mon, 19 Mar 2007 02:13:11 +0200 Message-ID: <200703190213.11569.caglar@pardus.org.tr> Reply-To: caglar@pardus.org.tr Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0311373928==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0311373928== Content-Type: multipart/signed; boundary="nextPart7167886.rBb7MteaEs"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart7167886.rBb7MteaEs Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi; With gcc-4.2.x xen fails to compile like following; gcc -O2 -fomit-frame-pointer -m32 -march=3Di686 -DNDEBUG -std=3Dgnu99 -Wall= -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -nostd= inc -fno-builtin -fno-common -fno-strict-aliasing -iwithprefix=20 include -Werror -Wno-pointer-arith -pipe -I/home/caglar/svn/xen-3.0.4-testi= ng.hg/xen/include -I/home/caglar/svn/xen-3.0.4-testing.hg/xen/include/asm-x= 86/mach-generic -I/home/caglar/svn/xen-3.0.4-testing.hg/xen/include/asm-x86= /mach-default -msoft-float -fno-stack-protector -g -D__XEN__ -c=20 symbols.c -o symbols.o cc1: warnings being treated as errors symbols.c: In function 'symbols_lookup': symbols.c:97: warning: the address of 'symbols_addresses' will always evalu= ate=20 as 'true' *** 1 errors, 0 warnings make[3]: *** [symbols.o] Error 1 make[3]: Leaving directory `/home/caglar/svn/xen-3.0.4-testing.hg/xen/commo= n' make[2]: *** [/home/caglar/svn/xen-3.0.4-testing.hg/xen/common/built_in.o]= =20 Error 2 make[2]: Leaving directory=20 `/home/caglar/svn/xen-3.0.4-testing.hg/xen/arch/x86' make[1]: *** [/home/caglar/svn/xen-3.0.4-testing.hg/xen/xen] Error 2 make[1]: Leaving directory `/home/caglar/svn/xen-3.0.4-testing.hg/xen' make: *** [build] Error 2 =46ollowing patch (against xen-3.0.4-testing) replaces that part Signed-off-by: S.=C3=87a=C4=9Flar Onur diff -r 3341afbb1953 xen/common/symbols.c =2D-- a/xen/common/symbols.c Thu Feb 15 11:34:58 2007 +0000 +++ b/xen/common/symbols.c Mon Mar 19 01:36:59 2007 +0200 @@ -94,7 +94,7 @@ const char *symbols_lookup(unsigned long unsigned long symbol_end =3D 0; =20 /* This kernel should never had been booted. */ =2D BUG_ON(!symbols_addresses); + BUG_ON(symbols_num_syms =3D=3D 0); =20 namebuf[KSYM_NAME_LEN] =3D 0; namebuf[0] =3D 0; Cheers =2D-=20 S.=C3=87a=C4=9Flar Onur http://cekirdek.pardus.org.tr/~caglar/ Linux is like living in a teepee. No Windows, no Gates and an Apache in hou= se! --nextPart7167886.rBb7MteaEs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) iD8DBQBF/dWXy7E6i0LKo6YRAmbRAKCrNCNrIftGRLuUaYihvOLGuju3KgCeJCzP UBqXWwO4cO2EUN4rUZLxnyc= =JCkh -----END PGP SIGNATURE----- --nextPart7167886.rBb7MteaEs-- --===============0311373928== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0311373928==--