summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-11-10 16:10:19 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-11-10 16:10:19 +0100
commit43d6926fbd61d73bdfb15d6d5aded3da7fa80bc7 (patch)
tree576a417f5807df3cb6f110f7fcff40bb775085e4
parentb92ae5455f9477d8f703032a1038f223d4b25c9b (diff)
pdf: avoid shadowing a global varibale by renaming oe in local scope
The global page variable is actually a poppler type and the local one only the page number as int.
-rw-r--r--src/bin/pdf/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pdf/main.cpp b/src/bin/pdf/main.cpp
index e33e18b..6b1de13 100644
--- a/src/bin/pdf/main.cpp
+++ b/src/bin/pdf/main.cpp
@@ -214,7 +214,7 @@ main(int argc, char **argv)
214 int i; 214 int i;
215 int size_w = 0, size_h = 0; 215 int size_w = 0, size_h = 0;
216 int head_only = 0; 216 int head_only = 0;
217 int page = 0; 217 int page_num = 0;
218 218
219 if (argc < 2) return -1; 219 if (argc < 2) return -1;
220 // file is ALWAYS first arg, other options come after 220 // file is ALWAYS first arg, other options come after
@@ -227,7 +227,7 @@ main(int argc, char **argv)
227 else if (!strcmp(argv[i], "-key")) 227 else if (!strcmp(argv[i], "-key"))
228 { 228 {
229 i++; 229 i++;
230 page = atoi(argv[i]); 230 page_num = atoi(argv[i]);
231 i++; 231 i++;
232 } 232 }
233 else if (!strcmp(argv[i], "-opt-scale-down-by")) 233 else if (!strcmp(argv[i], "-opt-scale-down-by"))
@@ -251,7 +251,7 @@ main(int argc, char **argv)
251 } 251 }
252 252
253 D("dpi....: %f\n", dpi); 253 D("dpi....: %f\n", dpi);
254 D("page...: %d\n", page); 254 D("page...: %d\n", page_num);
255 255
256 // This is a funny hack to call an external tool to generate a pdf that will then be processed by poppler 256 // This is a funny hack to call an external tool to generate a pdf that will then be processed by poppler
257 extension = strrchr(file, '.'); 257 extension = strrchr(file, '.');
@@ -306,7 +306,7 @@ main(int argc, char **argv)
306 306
307 // Now process the pdf (or the generated pdf) 307 // Now process the pdf (or the generated pdf)
308 D("poppler_file_init\n"); 308 D("poppler_file_init\n");
309 if (!poppler_init(file, page, size_w, size_h)) 309 if (!poppler_init(file, page_num, size_w, size_h))
310 return -1; 310 return -1;
311 D("poppler_file_init done\n"); 311 D("poppler_file_init done\n");
312 312