[Freeciv-Dev] (PR#39374) warnings while compilation of S2_1

2007-09-03 Thread Pepeto _

http://bugs.freeciv.org/Ticket/Display.html?id=39374 >

> [evyscr - Lun. Sep. 03 08:33:35 2007]:
> 
> On Sat, 1 Sep 2007 Pepeto _ wrote:
> 
> > 
> > http://bugs.freeciv.org/Ticket/Display.html?id=39644 >
> > 
> > > [pepeto - Ven. Aoû. 31 18:25:43 2007]:
> > > I always got this too, but it's not new:
> > > ltable.c: In function «luaH_mainposition":
> > > ltable.c:108: attention : transtypage d'un pointeur vers un entier de
> > > taille différente
> > > ltable.c:110: attention : transtypage d'un pointeur vers un entier de
> > > taille différente
> 
> I use following:
> $ cat s2_1-lua-x86_64.diff 
> Index: dependencies/lua/src/llimits.h
> ===
> --- dependencies/lua/src/llimits.h  (revision 13411)
> +++ dependencies/lua/src/llimits.h  (working copy)
> @@ -41,9 +41,9 @@
>  */
>  
>  /* an unsigned integer to hold hash values */
> -typedef unsigned int lu_hash;
> +typedef unsigned long lu_hash;
>  /* its signed equivalent */
> -typedef int ls_hash;
> +typedef long ls_hash;
>  
>  /* an unsigned integer big enough to count the total memory used by
Lua; */
>  /* it should be at least as large as size_t */
> $
> 
> In theory, it may causes troubles, but I don't have them (yet). And I
didn't
> test tutorial...
> 
> 
Is it really prudent to modify the code of the dependencies? Anyway,
it's only a warning, and it doesn't make me crash whereas freeciv S2_1
does :)

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39374) warnings while compilation of S2_1

2007-05-18 Thread Pepeto _

http://bugs.freeciv.org/Ticket/Display.html?id=39374 >

I configured with --enable-auth and got many warnings:

auth.c: In function ‘authdb_check_password’:
auth.c:422: attention : pointer targets in passing argument 3 of 
‘create_md5sum’ differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of ‘strlen’ 
differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of ‘strlen’ 
differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of 
‘__builtin_strcmp’ differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of ‘strlen’ 
differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of 
‘__builtin_strcmp’ differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of 
‘__builtin_strcmp’ differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of 
‘__builtin_strcmp’ differ in signedness
auth.c:423: attention : pointer targets in passing argument 1 of ‘strncmp’ 
differ in signedness

I don't see why this string (checksum) is defined unsigned, strange.

--- 12954/server/auth.c 2007-05-18 17:13:19.0 +0200
+++ test/server/auth.c  2007-05-18 17:11:15.0 +0200
@@ -415,7 +415,7 @@
#ifdef HAVE_AUTH
   bool ok = FALSE;
   char buffer[512] = "";
-  unsigned char checksum[DIGEST_HEX_BYTES];
+  char checksum[DIGEST_HEX_BYTES];
   MYSQL *sock, mysql;

   /* do the password checking right here */

_
Ten :  Messenger en illimité sur votre mobile !  
http://mobile.live.fr/messenger/ten/



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev