New submission from Vajrasky Kok:

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.

----------
components: Extension Modules
files: silent_compiler_warning_dbm_module.patch
keywords: patch
messages: 200402
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Compiler warning when compiling dbm module
versions: Python 3.4
Added file: 
http://bugs.python.org/file32223/silent_compiler_warning_dbm_module.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19296>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to