summaryrefslogtreecommitdiff
path: root/src/cache
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache')
-rw-r--r--src/cache/backings/file_common.h4
-rw-r--r--src/cache/handlers/http.c4
-rw-r--r--src/cache/range.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/cache/backings/file_common.h b/src/cache/backings/file_common.h
index 98bd420..3f4ed3b 100644
--- a/src/cache/backings/file_common.h
+++ b/src/cache/backings/file_common.h
@@ -5,7 +5,7 @@
#include "file.h"
-AL_UNUSED_FUNCTION_PUSH
+AL_IGNORE_WARNING("-Wunused-function")
static off_t file_backing_get_size_estimate(struct cch_backing *backing)
{
@@ -34,4 +34,4 @@ static bool file_open_internal(struct cch_backing_file *file, str *path, size_t
return true;
}
-AL_UNUSED_FUNCTION_POP
+AL_IGNORE_WARNING_END
diff --git a/src/cache/handlers/http.c b/src/cache/handlers/http.c
index d5c06dc..6ff5a3c 100644
--- a/src/cache/handlers/http.c
+++ b/src/cache/handlers/http.c
@@ -8,7 +8,7 @@
#include "http.h"
-static str USER_AGENT = al_str_c("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0");
+static str USER_AGENT = al_str_c("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36");
static bool handler_http_can_seek(struct cch_handler *handler)
{
@@ -72,7 +72,7 @@ static void handler_http_maybe_spawn_worker(struct cch_handler *handler, size_t
nn_http_set_url(request, &http->url);
nn_http_set_user_agent(request, &USER_AGENT);
nn_http_request_stream(request, NNWT_HTTP_GET, http->loop, http_callback, http);
- debug("Spawning worker for %.*s.", al_str_fmt(&http->url));
+ debug("Spawning worker for %.*s.", al_str_x(&http->url));
}
static bool handler_http_wait_for_range(struct cch_handler *handler, struct cch_handler_wait *wait)
diff --git a/src/cache/range.h b/src/cache/range.h
index 2a95953..c1ede09 100644
--- a/src/cache/range.h
+++ b/src/cache/range.h
@@ -4,12 +4,12 @@
#include "backing.h"
-AL_UNUSED_FUNCTION_PUSH
-
// @TODO:
// - cch_backing_remove_range().
// - Report overlap, don't unlock in backing_write() and handle fill in handler.
+AL_IGNORE_WARNING("-Wunused-function")
+
static void cch_backing_fill_range(struct cch_backing *backing, off_t index, off_t size)
{
struct cch_range *range;
@@ -22,4 +22,4 @@ static void cch_backing_fill_range(struct cch_backing *backing, off_t index, off
al_array_push(backing->available, ((struct cch_range){ index, index + size }));
}
-AL_UNUSED_FUNCTION_POP
+AL_IGNORE_WARNING_END