From f646898de0165ffc08b62f3ba36bee7f89efb5b7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 7 Jan 2025 10:27:13 +0100 Subject: [PATCH 1/2] Revert "Update fcgiapp.c" This reverts commit 3a29b212f4885182ebb269e4bd3f12c76fc5ebb1. --- libfcgi/fcgiapp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfcgi/fcgiapp.c b/libfcgi/fcgiapp.c index 31f61c1..6553ea0 100644 --- a/libfcgi/fcgiapp.c +++ b/libfcgi/fcgiapp.c @@ -468,8 +468,8 @@ int FCGX_VFPrintF(FCGX_Stream *stream, const char *format, va_list arg) fmtBuff[3] = (char) op; fmtBuff[4] = '\0'; specifierLength = 4; + break; } - break; case 'L': case 'h': sizeModifier = op; @@ -570,8 +570,8 @@ int FCGX_VFPrintF(FCGX_Stream *stream, const char *format, va_list arg) if(*p == 'l' && *(p + 1) == 'l') { sizeModifier = 'L'; CopyAndAdvance(&fmtBuffPtr, &p, 2); + break; } - break; case 'L': case 'h': sizeModifier = *p; From fe56ba7039870acb2ac45106e9c47c911c54c275 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 7 Jan 2025 10:28:56 +0100 Subject: [PATCH 2/2] fcgiapp: make the fall through explicit Looks like the fall though is required. So keep it, but give the compiler a hint it is explicit. Fixes: https://github.com/FastCGI-Archives/fcgi2/issues/70 --- libfcgi/fcgiapp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfcgi/fcgiapp.c b/libfcgi/fcgiapp.c index 6553ea0..4ffe318 100644 --- a/libfcgi/fcgiapp.c +++ b/libfcgi/fcgiapp.c @@ -470,6 +470,7 @@ int FCGX_VFPrintF(FCGX_Stream *stream, const char *format, va_list arg) specifierLength = 4; break; } + /* fall through */ case 'L': case 'h': sizeModifier = op; @@ -572,6 +573,7 @@ int FCGX_VFPrintF(FCGX_Stream *stream, const char *format, va_list arg) CopyAndAdvance(&fmtBuffPtr, &p, 2); break; } + /* fall through */ case 'L': case 'h': sizeModifier = *p;