This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2017-05-03.12:04:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za>
In-reply-to
Content
building '_bsddb' extension
gcc -pthread -fPIC -fno-strict-aliasing -O0 -g -O0 -Wall -Wstrict-prototypes -I/usr/include -I. -IInclude -I./Include -I/usr/local/include -I/home/haypo/prog/python/2.7/Include -I/home/haypo/prog/python/2.7 -c /home/haypo/prog/python/2.7/Modules/_bsddb.c -o build/temp.linux-x86_64-2.7-pydebug/home/haypo/prog/python/2.7/Modules/_bsddb.o
/home/haypo/prog/python/2.7/Modules/_bsddb.c: Dans la fonction « newDBObject »:
/home/haypo/prog/python/2.7/Modules/_bsddb.c:936:5: attention : this « else » clause does not guard... [-Wmisleading-indentation]
     else
     ^~~~
/home/haypo/prog/python/2.7/Modules/_bsddb.c:938:9: note : ...this statement, but the latter is misleadingly indented as if it is guarded by the « else »
         self->moduleFlags.cursorSetReturnsNone = DEFAULT_CURSOR_SET_RETURNS_NONE;
         ^~~~
gcc -pthread -shared build/temp.linux-x86_64-2.7-pydebug/home/haypo/prog/python/2.7/Modules/_bsddb.o -L/usr/lib64 -L/usr/local/lib -Wl,-R/usr/lib64 -ldb-5.3 -o build/lib.linux-x86_64-2.7-pydebug/_bsddb.so


I agree that the indentation is surprising and looks like a bug.

    if (self->myenvobj)
        self->moduleFlags = self->myenvobj->moduleFlags;
    else
        self->moduleFlags.getReturnsNone = DEFAULT_GET_RETURNS_NONE;
        self->moduleFlags.cursorSetReturnsNone = DEFAULT_CURSOR_SET_RETURNS_NONE;


Attached PR only don't set cursorSetReturnsNone to DEFAULT_CURSOR_SET_RETURNS_NONE anymore if self->myenvobj is set.
History
Date User Action Args
2017-05-03 12:04:41vstinnersetrecipients: + vstinner
2017-05-03 12:04:41vstinnersetmessageid: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za>
2017-05-03 12:04:41vstinnerlinkissue30257 messages
2017-05-03 12:04:41vstinnercreate