Project

General

Profile

Actions

Bug #10015

closed

nfs: macro expands to multiple statements

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
nfs - NFS server and client
Start date:
2018-11-30
Due date:
% Done:

100%

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

Description

Issue found by gcc 8 build:

    ../../common/fs/nfs/nfs4_client.c: In function 'nfs4_attr_cache':
    ../../common/fs/nfs/nfs4_client.c:517:28: error: macro expands to multiple statements [-Werror=multistatement-macros]
        PURGE_ATTRCACHE4_LOCKED(rp);
                                ^~
    ../../common/nfs/rnode4.h:444:2: note: in definition of macro 'PURGE_ATTRCACHE4_LOCKED'
      rp->r_time_attr_inval = gethrtime();   \
      ^~
    ../../common/fs/nfs/nfs4_client.c:516:3: note: some parts of macro expansion are not guarded by this 'if' clause
       if (!CACHE4_VALID(rp, vap->va_mtime, vap->va_size))
       ^~
    cc1: all warnings being treated as errors

    ../../common/fs/nfs/nfs4_srv_deleg.c: In function 'rfs4freeargres':
    ../../common/nfs/nfs4.h:1046:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmem_free((str).utf8string_val, (str).utf8string_len); \
      ^~~~~~~~~
    ../../common/fs/nfs/nfs4_srv_deleg.c:743:3: note: in expansion of macro 'UTF8STRING_FREE'
       UTF8STRING_FREE(args->tag)
       ^~~~~~~~~~~~~~~
    ../../common/fs/nfs/nfs4_srv_deleg.c:742:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (args->tag.utf8string_len > 0)
      ^~
    cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF