It has been reported that the Microsoft Visual C compiler complains if
a .c file do not contain any compilable code, which can happen if the
code has been #ifdef'ed out. To avoid this, these #ifdef sections have
a #else section which adds a static dummy() function which does nothing.
On the other hand, the GNU C compiler complains about unused functions when
it discovers this situation.
This patch tries to only add these dummy() functions if the Microsoft Visual C
compiler is detected, via the _MSC_VER macro.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Peter Stuge <peter@stuge.se>
| ... | ... |
@@ -470,5 +470,7 @@ int SSL_CTX_use_CryptoAPI_certificate(SSL_CTX *ssl_ctx, const char *cert_prop) |
| 470 | 470 |
} |
| 471 | 471 |
|
| 472 | 472 |
#else |
| 473 |
+#ifdef _MSC_VER /* Dummy function needed to avoid empty file compiler warning in Microsoft VC */ |
|
| 473 | 474 |
static void dummy (void) {}
|
| 475 |
+#endif |
|
| 474 | 476 |
#endif /* WIN32 */ |