Project

General

Profile

Bug #10015

nfs: macro expands to multiple statements

Added by Toomas Soome 8 months ago. Updated 8 months 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:

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

History

#1

Updated by Electric Monk 8 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 52deb364035dd2982f68cdad950a92d577b4784d

commit  52deb364035dd2982f68cdad950a92d577b4784d
Author: Toomas Soome <tsoome@me.com>
Date:   2018-12-05T01:21:32.000Z

    10015 nfs: macro expands to multiple statements
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF