[Privoxy-commits] [privoxy] branch master updated: nit: remove compiler warnings

User Git git at git.privoxy.org
Wed Jul 7 03:16:08 UTC 2021


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

The following commit(s) were added to refs/heads/master by this push:
     new 2feb45cf nit: remove compiler warnings
2feb45cf is described below

commit 2feb45cfe654463d3e52715e170deb5eccd8d429
Author: Lee <ler762 at users.sourceforge.net>
AuthorDate: Tue Jul 6 23:15:34 2021 -0400

    nit: remove compiler warnings
    
    "log_error(LOG_LEVEL_FATAL, ..." doesn't return but apparently the compiler doesn't know that.
    Get rid of several "this statement may fall through [-Wimplicit-fallthrough=]" warnings.
    
    i686-w64-mingw32-gcc -c -Imbedtls/include -pipe -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-but-set-variable -Wformat=2 -Wlogical-op -Wshadow -DNDEBUG -DWINVER=0x501  -I/source/pcre-8.44/ -I/source/mbedtls-2.16.10/include -I/source/brotli-1.0.9/c/include  -mwindows -Wall  jcc.c -o jcc.o
    jcc.c: In function ‘bind_port_helper’:
    jcc.c:5820:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
     5820 |             log_error(LOG_LEVEL_FATAL,
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
     5821 |                "can't bind to %s:%d: There may be another Privoxy "
          |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     5822 |                "or some other proxy running on port %d",
          |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     5823 |                bind_address, hport, hport);
          |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    jcc.c:5825:10: note: here
     5825 |          case -2:
          |          ^~~~
---
 jcc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/jcc.c b/jcc.c
index 5bd09351..df8ddd1a 100644
--- a/jcc.c
+++ b/jcc.c
@@ -5821,15 +5821,18 @@ static jb_socket bind_port_helper(const char *haddr, int hport, int backlog)
                "can't bind to %s:%d: There may be another Privoxy "
                "or some other proxy running on port %d",
                bind_address, hport, hport);
+            exit(-1);
 
          case -2:
             log_error(LOG_LEVEL_FATAL,
                "can't bind to %s:%d: The hostname is not resolvable",
                bind_address, hport);
+            exit(-1);
 
          default:
             log_error(LOG_LEVEL_FATAL, "can't bind to %s:%d: %E",
                bind_address, hport);
+            exit(-1);
       }
 
       /* shouldn't get here */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list