]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1909450 from trunk:
authorJoe Orton <jorton@apache.org>
Fri, 2 Feb 2024 11:50:07 +0000 (11:50 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 2 Feb 2024 11:50:07 +0000 (11:50 +0000)
Make sources build with latest clang version

Submitted by: icing
Reviewed by: minfrin, ylavic, jfclere

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1915534 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/scoreboard.c
server/util.c
server/util_expr_parse.c

index 4727961ff458f523bd07c4b831a4d44f366cb69f..1785839ddfaa52e85b4edc321691129b8a006f0c 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 5f4873acf2ba737de9809ea8396f38f4b4fa882a..0534e5b96abc6c914917a2daa1c2fc8c82a29872 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 0245720aa07062253120f484c8f477ef4d909af3..a304f2d4feb30f8e3a4d8bc4fec2474984fe1711 100644 (file)
@@ -446,7 +446,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 12dd56abeade83a4c1545df9f9189eb351b697ec..49d1600ca7213577097780b99f074bec9d0256c2 100644 (file)
@@ -653,7 +653,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) {
@@ -707,7 +707,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 4602c7a16cf7e285878c0391d59b556e21f80392..45502b885a7178860483d977bc1589139a105f16 100644 (file)
@@ -3144,7 +3144,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 bcf0173b7321eff63fd510597a54722aadae4e01..ac4a32344903089fb32cc61ddc35045b940810d0 100644 (file)
@@ -1326,6 +1326,8 @@ YYSTYPE yylval;
 
   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.  |
 `------------------------------------------------------------*/