Project

General

Profile

Actions

Bug #14074

closed

sbd: macro expands to multiple statements

Added by Toomas Soome about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

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

Description

Build errors on SPARC:

    ../../sun4u/io/sbd.c: In function 'sbd_check_unit_attached':
    ../../sun4u/sys/sbdpriv.h:144:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      144 |  (ep)->e_errno = EIO; \
          |  ^
    ../../sun4u/io/sbd.c:3933:3: note: in expansion of macro 'SBD_GET_PERR'
     3933 |   SBD_GET_PERR(hdp->h_err, ep);
          |   ^~~~~~~~~~~~
    ../../sun4u/io/sbd.c:3932:2: note: some parts of macro expansion are not guarded by this 'if' clause
     3932 |  if (rv == -1)
          |  ^~
    cc1: all warnings being treated as errors

Testing done: build/istall/boot. However, my test system is sun4v.

Actions #1

Updated by Toomas Soome about 1 month ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk about 1 month ago

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

git commit 50e803017668ce124e5b7c37cae78c397813805a

commit  50e803017668ce124e5b7c37cae78c397813805a
Author: Toomas Soome <tsoome@me.com>
Date:   2021-09-17T16:02:01.000Z

    14074 sbd: macro expands to multiple statements
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF