Project

General

Profile

Bug #10019

libsldap: 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/ns_reads.c: In function 'get_mapped_filter':
    ../common/ns_internal.h:217:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
      if (((err) = calloc(1, sizeof (struct ns_ldap_error))) == NULL) \
      ^~
    ../common/ns_reads.c:1364:5: note: in expansion of macro 'MKERROR'
         MKERROR(LOG_WARNING, cookie->errorp,
         ^~~~~~~
    ../common/ns_reads.c:1363:4: note: some parts of macro expansion are not guarded by this 'if' clause
        if (err)
        ^~
    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 a949e73d2676619263a21aaaaea30669bfcc27a1

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

    10019 libsldap: 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