From: Fabian Keil Date: Sun, 1 Mar 2009 18:28:24 +0000 (+0000) Subject: Help clang understand that we aren't dereferencing X-Git-Tag: v_3_0_12~51 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=9fe3265701787ccb1865ed5aaa05d164ce9559b7 Help clang understand that we aren't dereferencing NULL pointers here. --- diff --git a/cgi.c b/cgi.c index ef98085e..cbeafeda 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.113 2008/09/04 08:13:58 fabiankeil Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.114 2008/12/04 18:15:04 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -38,6 +38,9 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.113 2008/09/04 08:13:58 fabiankeil Exp $" * * Revisions : * $Log: cgi.c,v $ + * Revision 1.114 2008/12/04 18:15:04 fabiankeil + * Fix some cparser warnings. + * * Revision 1.113 2008/09/04 08:13:58 fabiankeil * Prepare for critical sections on Windows by adding a * layer of indirection before the pthread mutex functions. @@ -1501,6 +1504,7 @@ struct http_response *error_response(struct client_state *csp, * XXX: While the template is called forwarding-failed, * it currently only handles socks forwarding failures. */ + assert(fwd != NULL); assert(fwd->type != SOCKS_NONE); /* diff --git a/errlog.c b/errlog.c index 138d7e93..91319870 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.85 2009/02/06 17:51:38 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.86 2009/02/09 21:21:15 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,11 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.85 2009/02/06 17:51:38 fabiankeil E * * Revisions : * $Log: errlog.c,v $ + * Revision 1.86 2009/02/09 21:21:15 fabiankeil + * Now that init_log_module() is called earlier, call show_version() + * later on from main() directly so it doesn't get called for --help + * or --version. + * * Revision 1.85 2009/02/06 17:51:38 fabiankeil * Be prepared if I break the log module initialization again. * @@ -1053,6 +1058,7 @@ void log_error(int loglevel, const char *fmt, ...) "%s %08lx Fatal error: Out of memory in log_error().", timestamp, thread_id); fatal_error(tempbuf); /* Exit */ + return; } } outbuf = outbuf_save; diff --git a/filters.c b/filters.c index 5e26f502..99aa5c74 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.110 2008/11/10 16:40:25 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.111 2008/12/04 18:13:46 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -40,6 +40,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.110 2008/11/10 16:40:25 fabiankei * * Revisions : * $Log: filters.c,v $ + * Revision 1.111 2008/12/04 18:13:46 fabiankeil + * Fix a cparser warning. + * * Revision 1.110 2008/11/10 16:40:25 fabiankeil * Fix a gcc44 warning. * @@ -2475,6 +2478,7 @@ const static struct forward_spec *get_forward_override_settings(struct client_st log_error(LOG_LEVEL_FATAL, "can't allocate memory for forward-override{%s}", forward_override_line); /* Never get here - LOG_LEVEL_FATAL causes program exit */ + return NULL; } vec_count = ssplit(forward_settings, " \t", vec, SZ(vec), 1, 1); diff --git a/jcc.c b/jcc.c index c193898d..414e5fc0 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.224 2009/02/14 15:32:04 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.225 2009/02/19 18:09:32 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,10 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.224 2009/02/14 15:32:04 fabiankeil Exp $" * * Revisions : * $Log: jcc.c,v $ + * Revision 1.225 2009/02/19 18:09:32 fabiankeil + * Unbreak build without FEATURE_CONNECTION_KEEP_ALIVE. + * Noticed by David. + * * Revision 1.224 2009/02/14 15:32:04 fabiankeil * Add the request URL to the timeout message in chat(). * Suggested by Lee. @@ -2591,6 +2595,7 @@ static void chat(struct client_state *csp) { log_error(LOG_LEVEL_FATAL, "gateway spec is NULL!?!? This can't happen!"); /* Never get here - LOG_LEVEL_FATAL causes program exit */ + return; } /*