10019 libsldap: macro expands to multiple statements
Review Request #1305 - Created Nov. 30, 2018 and submitted
../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
It looks like this fixes the case where the statement is expanded to multiple statements in an if that isn't properly guarded. Does it actually fix the multiple statement warning? Regardless since it does fix one of the cases, seems fine.