Summary: | valgrind.h triggers compiler errors on MSVC when defining NVALGRIND | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Matthias Schwarzott <zzam> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | flo2030 |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | valgrind-h-fix-MSVC-warning-v1 |
Description
Matthias Schwarzott
2015-12-17 07:16:01 UTC
Created attachment 96139 [details]
valgrind-h-fix-MSVC-warning-v1
This patch fixes the issue.
But it looks a bit complicated.
It defines two different versions for VALGRIND_PRINTF depending on if compiler is gcc (understands __attribute__(unused) or not).
Maybe it would be simpler to just have this version for all compilers in case of NVALGRIND:
static int
#if defined(_MSC_VER)
__inline
#endif
VALGRIND_PRINTF(...)
{
return 0;
}
Fixed in r15762. |