nagyist / py-bcrypt

Automatically exported from code.google.com/p/py-bcrypt
Other
0 stars 0 forks source link

signedness warning when compiling under Ubuntu Linux 10.04.3 LTS #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Downloaded release 2.

When I run 'python setup.py build', I get the following warning:

bcrypt/bcrypt_python.c: In function âbcrypt_encode_saltâ:
bcrypt/bcrypt_python.c:56: warning: pointer targets in passing argument 2 of 
âencode_saltâ differ in signedness
bcrypt/bcrypt_python.c:29: note: expected âu_int8_t *â but argument is of 
type âchar *â

(I think the 'â' are because I have LC_COLLATE="C")

Anyway, editing bcrypt/bcrypt_python.c:40 to say...

   u_int8_t *csalt = NULL;

...gets rid of the warning. The generated library passes the provided 
regression tests. I can't pretend to know if the change is safe, though.

# python --version
Python 2.6.5
# gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3Copyright (C) 2009 Free Software Foundation, 
Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# uname -a
Linux cs 2.6.32-33-generic-pae #72-Ubuntu SMP Fri Jul 29 22:06:29 UTC 2011 i686 
GNU/Linux
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.3 LTS"

Original issue reported on code.google.com by holyte...@gmail.com on 20 Sep 2011 at 6:40

GoogleCodeExporter commented 8 years ago
Also same error on Windows 7 with MingW GCC.  

Suggested change works, compiled with no errors and passed tests.

Original comment by rspind...@webspin.biz on 7 Jun 2012 at 3:27

GoogleCodeExporter commented 8 years ago
Thanks - I've added this in preparation of a py-bcrypt-0.4 release.

Original comment by d...@djm.net.au on 27 Jul 2013 at 11:57