Project

General

Profile

Bug #10020

cmd-crypto: macro expands to multiple statements

Added by Toomas Soome 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2018-11-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

Issue found by gcc 8 build:

    gencert.c: In function 'gencert_pkcs11':
    gencert.c:37:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmfrv = f; \
      ^~~~~
    gencert.c:124:3: note: in expansion of macro 'SET_VALUE'
       SET_VALUE(kmf_set_cert_subject_altname(&signedCert, altcrit,
       ^~~~~~~~~
    gencert.c:123:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (altname != NULL)
      ^~
    gencert.c:37:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmfrv = f; \
      ^~~~~
    gencert.c:128:3: note: in expansion of macro 'SET_VALUE'
       SET_VALUE(kmf_set_cert_ku(&signedCert, kucrit, kubits),
       ^~~~~~~~~
    gencert.c:127:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (kubits != 0)
      ^~
    gencert.c: In function 'gencert_file':
    gencert.c:37:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmfrv = f; \
      ^~~~~
    gencert.c:330:3: note: in expansion of macro 'SET_VALUE'
       SET_VALUE(kmf_set_cert_subject_altname(&signedCert, altcrit,
       ^~~~~~~~~
    gencert.c:329:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (altname != NULL)
      ^~
    gencert.c:37:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmfrv = f; \
      ^~~~~
    gencert.c:334:3: note: in expansion of macro 'SET_VALUE'
       SET_VALUE(kmf_set_cert_ku(&signedCert, kucrit, kubits),
       ^~~~~~~~~
    gencert.c:333:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (kubits != 0)
      ^~
    gencert.c: In function 'gencert_nss':
    gencert.c:37:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmfrv = f; \
      ^~~~~
    gencert.c:482:3: note: in expansion of macro 'SET_VALUE'
       SET_VALUE(kmf_set_cert_subject_altname(&signedCert, altcrit,
       ^~~~~~~~~
    gencert.c:481:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (altname != NULL)
      ^~
    gencert.c:37:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      kmfrv = f; \
      ^~~~~
    gencert.c:486:3: note: in expansion of macro 'SET_VALUE'
       SET_VALUE(kmf_set_cert_ku(&signedCert, kucrit, kubits),
       ^~~~~~~~~
    gencert.c:485:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (kubits)
      ^~
    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 2f3d18f2c9f61603677fcb22d59f7157bae89d7e

commit  2f3d18f2c9f61603677fcb22d59f7157bae89d7e
Author: Toomas Soome <tsoome@me.com>
Date:   2018-12-05T01:55:54.000Z

    10020 cmd-crypto: macro expands to multiple statements
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF