Project

General

Profile

Actions

Bug #10010

closed

libsmbns: macro expands to multiple statements

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-11-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

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

Actions

Also available in: Atom PDF