Commit 872f11a2 authored by Moritz Lipp's avatar Moritz Lipp

Fix uninitialized data and unused functions

parent 224ade40
......@@ -74,7 +74,7 @@ START_TEST(test_annotation_polygon_get_vertices) {
} END_TEST
START_TEST(test_annotation_polygon_set_border) {
zathura_annotation_border_t border;
zathura_annotation_border_t border = { 0 };
/* invalid arguments */
fail_unless(zathura_annotation_polygon_set_border(NULL, border) == ZATHURA_ERROR_INVALID_ARGUMENTS);
......@@ -84,7 +84,7 @@ START_TEST(test_annotation_polygon_set_border) {
} END_TEST
START_TEST(test_annotation_polygon_get_border) {
zathura_annotation_border_t border;
zathura_annotation_border_t border = { 0 };
/* invalid arguments */
fail_unless(zathura_annotation_polygon_get_border(NULL, NULL) == ZATHURA_ERROR_INVALID_ARGUMENTS);
......
......@@ -98,7 +98,7 @@ START_TEST(test_annotation_poly_line_get_line_ending) {
} END_TEST
START_TEST(test_annotation_poly_line_set_border) {
zathura_annotation_border_t border;
zathura_annotation_border_t border = { 0 };
/* invalid arguments */
fail_unless(zathura_annotation_poly_line_set_border(NULL, border) == ZATHURA_ERROR_INVALID_ARGUMENTS);
......@@ -108,7 +108,7 @@ START_TEST(test_annotation_poly_line_set_border) {
} END_TEST
START_TEST(test_annotation_poly_line_get_border) {
zathura_annotation_border_t border;
zathura_annotation_border_t border = { 0 };
/* invalid arguments */
fail_unless(zathura_annotation_poly_line_get_border(NULL, NULL) == ZATHURA_ERROR_INVALID_ARGUMENTS);
......
......@@ -108,7 +108,7 @@ START_TEST(test_document_set_number_of_pages) {
fail_unless(zathura_document_set_number_of_pages(NULL, 1) == ZATHURA_ERROR_INVALID_ARGUMENTS);
/* valid arguments */
size_t number_of_pages;
unsigned int number_of_pages;
fail_unless(zathura_document_get_number_of_pages(document, &number_of_pages) == ZATHURA_ERROR_OK);
fail_unless(zathura_document_set_number_of_pages(document, number_of_pages) == ZATHURA_ERROR_OK);
} END_TEST
......
......@@ -10,6 +10,7 @@
#include "tests.h"
#ifdef WITH_LIBFIU
static int cb_test_image_buffer_new_calloc(const char* UNUSED(name), int *UNUSED(failnum),
void** UNUSED(failinfo), unsigned int* UNUSED(flags))
{
......@@ -23,6 +24,7 @@ static int cb_test_image_buffer_new_calloc(const char* UNUSED(name), int *UNUSED
return 0;
}
#endif
START_TEST(test_image_buffer_new) {
zathura_image_buffer_t* buffer;
......
......@@ -149,6 +149,7 @@ START_TEST(test_plugin_add_mime_type) {
fail_unless(zathura_plugin_add_mimetype(plugin, "application/pdf") == ZATHURA_ERROR_OK);
} END_TEST
#ifdef WITH_LIBFIU
static int cb_test_plugin_document_open_calloc(const char* UNUSED(name), int *UNUSED(failnum),
void** UNUSED(failinfo), unsigned int* UNUSED(flags))
{
......@@ -162,6 +163,7 @@ static int cb_test_plugin_document_open_calloc(const char* UNUSED(name), int *UN
return 0;
}
#endif
START_TEST(test_plugin_open_document) {
zathura_document_t* document;
......
Markdown is supported
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