Actions
Bug #10010
closedlibsmbns: macro expands to multiple statements
Start date:
2018-11-27
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
Issue found by gcc 8 build:
In file included from ../common/smbns_netbios_cache.c:34: ../common/smbns_netbios_cache.c: In function 'smb_netbios_cache_insrefq': ../common/smbns_netbios.h:41:2: error: macro expands to multiple statements [-Werror=multistatement-macros] ((e)->back) = (void *)((q)->back); \ ^ ../common/smbns_netbios_cache.c:488:5: note: in expansion of macro 'QUEUE_INSERT_TAIL' QUEUE_INSERT_TAIL(&refq->head, refent) ^~~~~~~~~~~~~~~~~ ../common/smbns_netbios_cache.c:487:4: note: some parts of macro expansion are not guarded by this 'if' clause if (refent) ^~ In file included from ../common/smbns_netbios_cache.c:34: ../common/smbns_netbios.h:41:2: error: macro expands to multiple statements [-Werror=multistatement-macros] ((e)->back) = (void *)((q)->back); \ ^ ../common/smbns_netbios_cache.c:497:4: note: in expansion of macro 'QUEUE_INSERT_TAIL' QUEUE_INSERT_TAIL(&refq->head, refent) ^~~~~~~~~~~~~~~~~ ../common/smbns_netbios_cache.c:496:3: note: some parts of macro expansion are not guarded by this 'if' clause if (refent) ^~ In file included from ../common/smbns_netbios_cache.c:34: ../common/smbns_netbios_cache.c: In function 'smb_netbios_cache_delete_locals': ../common/smbns_netbios.h:41:2: error: macro expands to multiple statements [-Werror=multistatement-macros] ((e)->back) = (void *)((q)->back); \ ^ ../common/smbns_netbios_cache.c:593:5: note: in expansion of macro 'QUEUE_INSERT_TAIL' QUEUE_INSERT_TAIL(&delq->head, delent) ^~~~~~~~~~~~~~~~~ ../common/smbns_netbios_cache.c:592:4: note: some parts of macro expansion are not guarded by this 'if' clause if (delent) ^~ cc1: all warnings being treated as errors
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit 8421bc58f13e94e818fb7374158f5450f9c4931d
commit 8421bc58f13e94e818fb7374158f5450f9c4931d Author: Toomas Soome <tsoome@me.com> Date: 2018-12-03T21:50:18.000Z 10010 libsmbns: macro expands to multiple statements Reviewed by: Peter Tribble <peter.tribble@gmail.com> Reviewed by: Alexander Pyhalov <apyhalov@gmail.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Actions