libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 9d80af66d56fbd1f76c682e82f27ef6c3ba00111
parent aaecd079b6b81717e88ed30c90efb809bad2f229
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 21 Aug 2012 12:37:36 +0000

use int instead of enums in va_arg calls

Diffstat:
MChangeLog | 5+++++
Msrc/daemon/daemon.c | 4++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 21 14:36:17 CEST 2012 + Use "int" instead of "enum X" in 'va_arg' calls to be nice to + compilers that use 'short' (i.e. 8 or 16 bit) enums but pass + enums still as "int" in varargs. (See discussion on mailinglist). -CG/MV + Tue Aug 21 14:31:54 CEST 2012 Reduce default size in post processor buffer (for small systems; performance impact on large systems should be minimal). -CG/MV diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -1748,7 +1748,7 @@ parse_options_va (struct MHD_Daemon *daemon, const char *pstr; #endif - while (MHD_OPTION_END != (opt = va_arg (ap, enum MHD_OPTION))) + while (MHD_OPTION_END != (opt = (enum MHD_OPTION) va_arg (ap, int))) { switch (opt) { @@ -1821,7 +1821,7 @@ parse_options_va (struct MHD_Daemon *daemon, #endif break; case MHD_OPTION_HTTPS_CRED_TYPE: - daemon->cred_type = va_arg (ap, gnutls_credentials_type_t); + daemon->cred_type = (gnutls_credentials_type_t) va_arg (ap, int); break; case MHD_OPTION_HTTPS_PRIORITIES: if (0 != (daemon->options & MHD_USE_SSL))