Message200402
I got this warning when compiling dbm module with Python 3.4.
/home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c: In function ‘newdbmobject’:
/home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c:55:5: warning: passing argument 1 of ‘dbm_open’ discards ‘const’ qualifier from pointer target type [enabled by default]
In file included from /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c:16:0:
/usr/include/ndbm.h:55:14: note: expected ‘char *’ but argument is of type ‘const char *’
I have two ndbm.h.
/usr/include/ndbm.h
/usr/include/gdbm/ndbm.h
Both of them expect char *file not const char *file in dbm_open.
I downloaded the newest GNU database manager from http://www.gnu.org.ua/software/gdbm/download.html (gdbm-1.10.tar.gz). It expects char *file as well in dbm_open.
Attached the patch to silent the compiler warning.
But when I searched 'dbm_open' in search engines or did "man dbm_open", I got:
DBM *dbm_open(const char *file, int open_flags, mode_t file_mode);
So I am not really sure about this. Feel free to close this ticket if it is not valid. |
|
Date |
User |
Action |
Args |
2013-10-19 11:02:46 | vajrasky | set | recipients:
+ vajrasky |
2013-10-19 11:02:46 | vajrasky | set | messageid: <1382180566.13.0.638248121089.issue19296@psf.upfronthosting.co.za> |
2013-10-19 11:02:46 | vajrasky | link | issue19296 messages |
2013-10-19 11:02:45 | vajrasky | create | |
|