Page MenuHome GnuPG

Compiler warnings in libgpg-error 1.33 on macOS
Closed, ResolvedPublic


I just downloaded and built libgpg-error 1.33 on macOS 10.13.6 (High Sierra). It built successfully, but I see a bunch of compiler warnings that I don't recall seeing before. They all look like this (but the "file included from" changes):

In file included from posix-lock.c:42:
./gpgrt-int.h:467:9: warning: 'snprintf' macro redefined [-Wmacro-redefined]
#define snprintf _gpgrt_estream_snprintf
/Applications/ note:
      previous definition is here
#define snprintf(str, len, ...) \
1 warning generated.

Event Timeline

chdiza created this object in space S1 Public.

Well, -Wno-macro-redefined should silence the warning but Iwill add an undef before our macro definition. The snprintf macro is used to make sure the libgpg-error's own printf implementation is used.

werner claimed this task.

Thanks for the report.