summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2019-03-29 17:42:52 +0100
committerAlbert Astals Cid <aacid@kde.org>2019-06-05 20:39:51 +0200
commit3d410e44ab50f064671f6b3c72f7e7eb8d015aeb (patch)
tree7089aaebbc2d68d3f4fc4cb047f4e5018f356822 /test
parent0593f2567c3887b9323bb7c73f6b62748b44722a (diff)
gtk-test.cc: Rename variable to fix shadow warning
Diffstat (limited to 'test')
-rw-r--r--test/gtk-test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/gtk-test.cc b/test/gtk-test.cc
index 5d2e285f..24fd39ce 100644
--- a/test/gtk-test.cc
+++ b/test/gtk-test.cc
@@ -17,14 +17,14 @@
#include <gtk/gtk.h>
#include <math.h>
-static int page = 0;
+static int requested_page = 0;
static gboolean cairo_output = FALSE;
static gboolean splash_output = FALSE;
static const char **file_arguments = nullptr;
static const GOptionEntry options[] = {
{ "cairo", 'c', 0, G_OPTION_ARG_NONE, &cairo_output, "Cairo Output Device", nullptr},
{ "splash", 's', 0, G_OPTION_ARG_NONE, &splash_output, "Splash Output Device", nullptr},
- { "page", 'p', 0, G_OPTION_ARG_INT, &page, "Page number", "PAGE" },
+ { "page", 'p', 0, G_OPTION_ARG_INT, &requested_page, "Page number", "PAGE" },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, nullptr, "PDF-FILES…" },
{ }
};
@@ -394,7 +394,7 @@ main (int argc, char *argv [])
view = view_new (doc);
view_list = g_list_prepend (view_list, view);
- view_set_page (view, CLAMP (page, 0, poppler_document_get_n_pages (doc) - 1));
+ view_set_page (view, CLAMP (requested_page, 0, poppler_document_get_n_pages (doc) - 1));
}
gtk_main ();