From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Date: Fri, 11 Jan 2008 13:14:01 +0000 Subject: [kvm-ppc-devel] The default for char Literals differ in signedness Message-Id: <47876B99.1000600@linux.vnet.ibm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: kvm-ppc@vger.kernel.org Hi, maybe its an issue of my build environment only, but when I compile kvm-use= rspace for our platform I see a lot of warnings like that in the qemu code: warning: pointer targets in passing argument 3 of 'PPC_NVRAM_set_params= ' differ in signedness The reason is that some code defines function prototypes and variables with= the type "const unsigned char*" and then assigns a literal like "PPC" to i= t. But per default our platform seems to have "const signed char*" for lite= rals and so we get a lot of annoying warnings. E.g. nearly every line in qe= mu/target-ppc/translate.c. Should we do anything to prevent these Warnings or do you even see those ? We could search for compiler options like -fsigned-string/-funsigned-string= (did not help here in a quick test) or patch qemu code to our signedness, = but this would need extensive tests to prevent that we fix it for us and cr= eate the same warning for others. The gcc developers here said a literal is defined as "array of char" which = obviously can be cast implicitly to "const char*" and the platform decides = if it is signed or unsigned - at least most library functions solve this by= using "const char*" without signedness. That way the compilation should wo= rk for everyone because the variables/prototypes are automatically mapped t= o the platform defined signedness as the literals are too. The questions for our project are: - do we need that fixed? - is it our job to fix that? - Which approach should we go (maybe I missed some possible solutions)? Whats your opinion on that? --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel