summaryrefslogtreecommitdiff
path: root/Build/source/texk/seetexk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-10-05 07:25:22 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-10-05 07:25:22 +0000
commita3a26fc921f8182b70d96386e6d76ce051ed247f (patch)
tree81ee0abaea166c2096aa19577d44e614dc106a40 /Build/source/texk/seetexk
parent0f7bd3250e221109f6e4df19d1ee834374999ba7 (diff)
texk/seetexk: Small rearrangement to avoid compiler warning
git-svn-id: svn://tug.org/texlive/trunk@38554 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/seetexk')
-rw-r--r--Build/source/texk/seetexk/ChangeLog5
-rw-r--r--Build/source/texk/seetexk/dvitodvi.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/Build/source/texk/seetexk/ChangeLog b/Build/source/texk/seetexk/ChangeLog
index 15d019155fe..980f0f6ff36 100644
--- a/Build/source/texk/seetexk/ChangeLog
+++ b/Build/source/texk/seetexk/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dvitodvi.c (ParseSpecs): Avoid to return the address of a
+ local variable, even when the result is discarded.
+
2015-07-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Better dependencies for 'make check'.
diff --git a/Build/source/texk/seetexk/dvitodvi.c b/Build/source/texk/seetexk/dvitodvi.c
index 36bfaeac919..e081fc3a0cf 100644
--- a/Build/source/texk/seetexk/dvitodvi.c
+++ b/Build/source/texk/seetexk/dvitodvi.c
@@ -301,15 +301,17 @@ parsedimen(char **sp)
static struct pagespec *
ParseSpecs(char *str, int make)
{
- struct pagespec *head, *tail;
+ struct pagespec *result, *head, *tail;
int other = 0;
int num = -1;
struct pagespec spare;
if (make)
- head = tail = newspec();
- else
+ result = head = tail = newspec();
+ else {
+ result = NULL;
head = tail = &spare;
+ }
while (*str) {
if (isdigit((unsigned char)*str)) {
num = parseint(&str);
@@ -357,7 +359,7 @@ ParseSpecs(char *str, int make)
specusage();
else if (num >= 0)
tail->pageno = num;
- return (head);
+ return result;
}
static i32