]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make sources build with latest clang version
authorStefan Eissing <icing@apache.org>
Thu, 27 Apr 2023 07:14:36 +0000 (07:14 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 27 Apr 2023 07:14:36 +0000 (07:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909450 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_socache_shmcb.c
modules/proxy/balancers/mod_lbmethod_heartbeat.c
os/unix/unixd.c
server/buildmark.c
server/mpm/simple/simple_core.c
server/scoreboard.c
server/util.c
server/util_expr_parse.c

index 34f830107155725f9d288de16e8ebb5426c1642c..e51a32b40c177ecf845098da3a5ad6f176f67aae 100644 (file)
@@ -793,7 +793,6 @@ static int shmcb_subcache_store(server_rec *s, SHMCBHeader *header,
      */
     if (header->subcache_data_size - subcache->data_used < total_len
         || subcache->idx_used == header->index_num) {
-        unsigned int loop = 0;
 
         idx = SHMCB_INDEX(subcache, subcache->idx_pos);
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00845)
@@ -820,7 +819,6 @@ static int shmcb_subcache_store(server_rec *s, SHMCBHeader *header,
             header->stat_scrolled++;
             /* Loop admin */
             idx = idx2;
-            loop++;
         } while (header->subcache_data_size - subcache->data_used < total_len);
 
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00846)
index 412bac420e680ca327b153b078a147922e2ed10a..ef38cd92fa35074c1bd84c2faa1fc1560151f7bf 100644 (file)
@@ -115,7 +115,6 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
 
     {
         char *t;
-        int lineno = 0;
         apr_bucket_alloc_t *ba = apr_bucket_alloc_create(pool);
         apr_bucket_brigade *bb = apr_brigade_create(pool, ba);
         apr_bucket_brigade *tmpbb = apr_brigade_create(pool, ba);
@@ -137,7 +136,6 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
 
             rv = apr_brigade_split_line(tmpbb, bb,
                                         APR_BLOCK_READ, sizeof(buf));
-            lineno++;
 
             if (rv) {
                 return rv;
index eed76f683b21908f19f814e9b436cb3c034c3845..5de0520997513545c83bd7c0bfb405f031f0e9a0 100644 (file)
@@ -452,7 +452,7 @@ static apr_status_t retained_data_cleanup(void *unused)
     return APR_SUCCESS;
 }
 
-AP_DECLARE(ap_unixd_mpm_retained_data *) ap_unixd_mpm_get_retained_data()
+AP_DECLARE(ap_unixd_mpm_retained_data *) ap_unixd_mpm_get_retained_data(void)
 {
     if (!retained_data) {
         retained_data = ap_retained_data_create("ap_unixd_mpm_retained_data",
index a9cd6844a9bedf91a37728ffb34ce735ec0f2ab7..36bd7134ea62cccf00ea202c759c6db6fb867dc2 100644 (file)
@@ -23,7 +23,7 @@ static const char server_built[] = __DATE__ " " __TIME__;
 static const char server_built[] = "unknown";
 #endif
 
-AP_DECLARE(const char *) ap_get_server_built()
+AP_DECLARE(const char *) ap_get_server_built(void)
 {
     return server_built;
 }
index 24843be73523e6b46cacddec858ab689c9bac9ea..f4fd73ecacd23fc00f3a92c122b9653cbe9b829c 100644 (file)
@@ -28,7 +28,7 @@ static simple_core_t *g_simple_core;
 
 APLOG_USE_MODULE(mpm_simple);
 
-simple_core_t *simple_core_get()
+simple_core_t *simple_core_get(void)
 {
     return g_simple_core;
 }
index 181477e357890e90508e93e8401d745b549c1e03..a203e98f7bf495e1eea4851ecf5c02bd9d54275e 100644 (file)
@@ -654,7 +654,7 @@ AP_DECLARE(void) ap_time_process_request(ap_sb_handle_t *sbh, int status)
     }
 }
 
-AP_DECLARE(int) ap_update_global_status()
+AP_DECLARE(int) ap_update_global_status(void)
 {
 #ifdef HAVE_TIMES
     if (ap_scoreboard_image == NULL) {
@@ -708,7 +708,7 @@ AP_DECLARE(process_score *) ap_get_scoreboard_process(int x)
     return &ap_scoreboard_image->parent[x];
 }
 
-AP_DECLARE(global_score *) ap_get_scoreboard_global()
+AP_DECLARE(global_score *) ap_get_scoreboard_global(void)
 {
     return ap_scoreboard_image->global;
 }
index 77c40956374bc9b9043a072f85882bcc844bf535..04f40a235a277e12533442b4235b6c854da8be0c 100644 (file)
@@ -3244,7 +3244,7 @@ AP_DECLARE(apr_status_t) ap_varbuf_regsub(struct ap_varbuf *vb,
 static const char * const oom_message = "[crit] Memory allocation failed, "
                                         "aborting process." APR_EOL_STR;
 
-AP_DECLARE(void) ap_abort_on_oom()
+AP_DECLARE(void) ap_abort_on_oom(void)
 {
     int written, count = strlen(oom_message);
     const char *buf = oom_message;
index 041f5e77e702a2df25c603f40c104202bfbb5cce..8a0fbde523b0e76031dbb9d9d409bfec0ead7967 100644 (file)
@@ -1232,6 +1232,8 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
   yychar = YYEMPTY; /* Cause a token to be read.  */
   goto yysetstate;
 
+  /* TODO: comppiler warning that this is unused, and it seems to */
+  (void)yynerrs;
 /*------------------------------------------------------------.
 | yynewstate -- Push a new state, which is found in yystate.  |
 `------------------------------------------------------------*/