]> granicus.if.org Git - apache/commitdiff
Eliminate several unused variables, observe a file size -> cache entry size
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 17 Aug 2004 16:34:51 +0000 (16:34 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 17 Aug 2004 16:34:51 +0000 (16:34 +0000)
  overflow, and reorder a few headers so we compile clean.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104688 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/mod_cache.c
modules/experimental/mod_disk_cache.c
modules/experimental/mod_mem_cache.c

index 7fce0ee0fafb3b4febb98e7aa2568d2c16175d5c..a4de02d5d1676bf051048666c78daafd2100457f 100644 (file)
@@ -51,7 +51,6 @@ static int cache_url_handler(request_rec *r, int lookup)
     const char *pragma, *auth;
     apr_uri_t uri;
     char *url;
-    apr_size_t urllen;
     char *path;
     cache_provider_list *providers;
     cache_info *info;
index 9e54ef043b428b8ba204e535499406144acc45cb..a3efeee0803e8e3dcae62a886f4ecbdc5e97eea2 100644 (file)
  * limitations under the License.
  */
 
-#include "mod_cache.h"
 #include "apr_file_io.h"
 #include "apr_strings.h"
+#include "mod_cache.h"
+#include "ap_provider.h"
 #include "util_filter.h"
 #include "util_script.h"
 
@@ -224,7 +225,6 @@ static int file_cache_recall_mydata(apr_file_t *fd, cache_info *info,
 {
     apr_status_t rv;
     char *urlbuff;
-    char * temp;
     disk_cache_info_t disk_info;
     apr_size_t len;
 
@@ -424,7 +424,6 @@ static int remove_url(const char *key)
  */
 static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
 {
-    apr_status_t rv;
     disk_cache_object_t *dobj = (disk_cache_object_t *) h->cache_obj->vobj;
     apr_table_t * tmp;
 
@@ -520,8 +519,6 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
     disk_cache_conf *conf = ap_get_module_config(r->server->module_config,
                                                  &disk_cache_module);
     apr_status_t rv;
-    char *buf;
-    char statusbuf[8];
     apr_size_t amt;
     disk_cache_object_t *dobj = (disk_cache_object_t*) h->cache_obj->vobj;
     apr_file_t *hfd = dobj->hfd;
@@ -662,6 +659,7 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
     /* Was this the final bucket? If yes, close the body file and make sanity checks */
     if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(b))) {
         if (h->cache_obj->info.len <= 0) {
+          /* XXX Fixme: file_size isn't constrained by size_t. */
           h->cache_obj->info.len = dobj->file_size;
         }
         else if (h->cache_obj->info.len != dobj->file_size) {
index 03d1509aba526d67655b8287b610474b006b5cb1..cb7094bf62eb5942961c977e9402d9fea30db493 100644 (file)
@@ -17,6 +17,7 @@
 #include "mod_cache.h"
 #include "cache_pqueue.h"
 #include "cache_cache.h"
+#include "ap_provider.h"
 #include "ap_mpm.h"
 #include "apr_thread_mutex.h"
 #if APR_HAVE_UNISTD_H