
py-bcrypt - issue #2
signedness warning when compiling under Ubuntu Linux 10.04.3 LTS
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"
Comment #1
Posted on Jun 7, 2012 by Happy PandaAlso same error on Windows 7 with MingW GCC.
Suggested change works, compiled with no errors and passed tests.
Comment #2
Posted on Jul 27, 2013 by Massive WombatThanks - I've added this in preparation of a py-bcrypt-0.4 release.
Status: Fixed
Labels:
Type-Defect
Priority-Medium