Commit 2ad8571f authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

Add missing includes



Also fix other compiler warnings.

Closes: #332
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent f3229a6a
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#ifdef WITH_MAGIC #ifdef WITH_MAGIC
#include <magic.h> #include <magic.h>
#endif #endif
#include <unistd.h>
#include <girara/datastructures.h> #include <girara/datastructures.h>
#include <girara/utils.h> #include <girara/utils.h>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <girara/utils.h> #include <girara/utils.h>
#include <locale.h> #include <locale.h>
#include <unistd.h>
#include "zathura.h" #include "zathura.h"
#include "utils.h" #include "utils.h"
......
...@@ -1400,7 +1400,7 @@ zathura_page_cache_lru_invalidate(zathura_t* zathura) ...@@ -1400,7 +1400,7 @@ zathura_page_cache_lru_invalidate(zathura_t* zathura)
g_return_val_if_fail(page_widget != NULL, -1); g_return_val_if_fail(page_widget != NULL, -1);
zathura_page_widget_update_surface(ZATHURA_PAGE(page_widget), NULL); zathura_page_widget_update_surface(ZATHURA_PAGE(page_widget), NULL);
girara_debug("Invalidated page %d at cache index %ld", zathura->page_cache.cache[lru_index] + 1, lru_index); girara_debug("Invalidated page %d at cache index %zd", zathura->page_cache.cache[lru_index] + 1, lru_index);
zathura->page_cache.cache[lru_index] = -1; zathura->page_cache.cache[lru_index] = -1;
--zathura->page_cache.num_cached_pages; --zathura->page_cache.num_cached_pages;
...@@ -1457,7 +1457,7 @@ zathura_page_cache_add(zathura_t* zathura, unsigned int page_index) ...@@ -1457,7 +1457,7 @@ zathura_page_cache_add(zathura_t* zathura, unsigned int page_index)
zathura->page_cache.cache[idx] = page_index; zathura->page_cache.cache[idx] = page_index;
++zathura->page_cache.num_cached_pages; ++zathura->page_cache.num_cached_pages;
girara_debug("Page %d is cached at cache index %ld", page_index + 1, idx); girara_debug("Page %d is cached at cache index %zd", page_index + 1, idx);
return; return;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment