Add missing includes

Also fix other compiler warnings.

Closes: #332

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2013-07-25 21:57:39 +02:00
parent f3229a6a5a
commit 2ad8571f41
3 changed files with 4 additions and 2 deletions

View file

@ -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>

1
main.c
View file

@ -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"

View file

@ -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)
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;
} }