From b0fa082511744402e1a5c46a9f17728745163e88 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 7 Mar 2021 19:18:33 +0100 Subject: dmstor_ctx(): avoid setting a variable that is not read --- src/dmstor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/dmstor.cpp b/src/dmstor.cpp index 4c7408cf..e65d4884 100644 --- a/src/dmstor.cpp +++ b/src/dmstor.cpp @@ -27,7 +27,7 @@ dmstor(const char *is, char **rs) { double dmstor_ctx(PJ_CONTEXT *ctx, const char *is, char **rs) { - int sign, n, nl; + int n, nl; char *s, work[MAX_WORK]; const char* p; double v, tv; @@ -35,7 +35,7 @@ dmstor_ctx(PJ_CONTEXT *ctx, const char *is, char **rs) { if (rs) *rs = (char *)is; /* copy sting into work space */ - while (isspace(sign = *is)) ++is; + while (isspace(*is)) ++is; n = MAX_WORK; s = work; p = (char *)is; @@ -44,7 +44,7 @@ dmstor_ctx(PJ_CONTEXT *ctx, const char *is, char **rs) { *s = '\0'; /* it is possible that a really odd input (like lots of leading zeros) could be truncated in copying into work. But ... */ - sign = *(s = work); + int sign = *(s = work); if (sign == '+' || sign == '-') s++; else sign = '+'; v = 0.; -- cgit v1.2.3