10010 libsmbns: macro expands to multiple statements

Review Request #1298 - Created Nov. 27, 2018 and submitted

Information
Toomas Soome
illumos-gate
10010
2d2c0fe...
Reviewers
general
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

  
Peter Tribble
Alexander Pyhalov
Gergő Mihály Doma
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...