From a36b9042bdce13162cd379dcc003d916bd7febc8 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 27 Jul 2009 17:28:41 +0000 Subject: [PATCH] local synctex change: fix the printf specifier for a parameter (of type size_t), to be %zd instead of %d add the change as local patch 05-fix-error-formats.diff svn path=/trunk/KDE/kdegraphics/okular/; revision=1003109 --- .../synctex/patches/05-fix-error-formats.diff | 13 +++++++++++++ generators/poppler/synctex/patches/series | 1 + generators/poppler/synctex/synctex_parser.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 generators/poppler/synctex/patches/05-fix-error-formats.diff diff --git a/generators/poppler/synctex/patches/05-fix-error-formats.diff b/generators/poppler/synctex/patches/05-fix-error-formats.diff new file mode 100644 index 000000000..50d65fb81 --- /dev/null +++ b/generators/poppler/synctex/patches/05-fix-error-formats.diff @@ -0,0 +1,13 @@ +Index: synctex/synctex_parser.c +=================================================================== +--- synctex.orig/synctex_parser.c 2009-07-27 19:21:55.000000000 +0200 ++++ synctex/synctex_parser.c 2009-07-27 19:22:47.000000000 +0200 +@@ -1418,7 +1418,7 @@ + len = SYNCTEX_END - SYNCTEX_CUR; + if(current_size>UINT_MAX-len-1) { + /* We have reached the limit. */ +- _synctex_error("! limit reached (missing %i).",current_size-(UINT_MAX-len-1)); ++ _synctex_error("! limit reached (missing %zd).",current_size-(UINT_MAX-len-1)); + return SYNCTEX_STATUS_ERROR; + } + new_size = current_size+len; diff --git a/generators/poppler/synctex/patches/series b/generators/poppler/synctex/patches/series index 9ac0a9874..3e2340a4e 100644 --- a/generators/poppler/synctex/patches/series +++ b/generators/poppler/synctex/patches/series @@ -2,3 +2,4 @@ 02-fix-_synctex_error.diff 03-fix-_synctex_scan_named.diff 04-gcc-specify-printf-format.diff +05-fix-error-formats.diff diff --git a/generators/poppler/synctex/synctex_parser.c b/generators/poppler/synctex/synctex_parser.c index 7c9b42c34..05b92bf0e 100644 --- a/generators/poppler/synctex/synctex_parser.c +++ b/generators/poppler/synctex/synctex_parser.c @@ -1418,7 +1418,7 @@ next_character: len = SYNCTEX_END - SYNCTEX_CUR; if(current_size>UINT_MAX-len-1) { /* We have reached the limit. */ - _synctex_error("! limit reached (missing %i).",current_size-(UINT_MAX-len-1)); + _synctex_error("! limit reached (missing %zd).",current_size-(UINT_MAX-len-1)); return SYNCTEX_STATUS_ERROR; } new_size = current_size+len;