Project

General

Profile

Bug #10018

libkmf: macro expands to multiple statements

Added by Toomas Soome 11 months ago. Updated 10 months ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

Issue found by gcc 8 build:

    ../common/openssl_spi.c:1037:13: error: macro expands to multiple statements [-Werror=multistatement-macros]
       SET_ERROR(kmfh, ERR_get_error());
                 ^~~~
    ../common/openssl_spi.c:134:25: note: in definition of macro 'SET_ERROR'
     #define SET_ERROR(h, c) h->lasterr.kstype = KMF_KEYSTORE_OPENSSL; \
                             ^
    ../common/openssl_spi.c:1036:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (pkey == NULL)
      ^~

    ../common/pkcs11_spi.c: In function 'store_raw_key':
    ../common/pkcs11_spi.c:3249:11: error: macro expands to multiple statements [-Werror=multistatement-macros]
       SETATTR(templ, i, CKA_DECRYPT, &cktrue, sizeof (cktrue)); i++;
               ^~~~~
    ../common/pkcs11_spi.c:43:2: note: in definition of macro 'SETATTR'
      t[n].type = atype; \
      ^
    ../common/pkcs11_spi.c:3248:2: note: some parts of macro expansion are not guarded by this 'if' clause
      if (keytype != CKK_EC)
      ^~

    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 10 months ago

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

git commit a50e8766452bf989ab5da8c51bb857190e7a18c9

commit  a50e8766452bf989ab5da8c51bb857190e7a18c9
Author: Toomas Soome <tsoome@me.com>
Date:   2018-12-05T01:59:04.000Z

    10018 libkmf: macro expands to multiple statements
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF