diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-10-12 07:45:01 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-12 06:52:56 +0000 |
commit | ccc5ea08d64c38a9ce925d448c3010aca19ed35c (patch) | |
tree | e50c45ee596185f9a030641465796394c71ad410 /onlineupdate/source/update | |
parent | 898aff0d190b09d16cce866909b64cf023cba43f (diff) |
cppcheck:variableScope
Change-Id: I037feb335499629300309851dcda3bb661f03d4f
Reviewed-on: https://gerrit.libreoffice.org/19316
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'onlineupdate/source/update')
-rw-r--r-- | onlineupdate/source/update/src/mar_create.c | 3 | ||||
-rw-r--r-- | onlineupdate/source/update/updater/nsWindowsRestart.cxx | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/onlineupdate/source/update/src/mar_create.c b/onlineupdate/source/update/src/mar_create.c index a87e937fe4a3..c874b44e96ec 100644 --- a/onlineupdate/source/update/src/mar_create.c +++ b/onlineupdate/source/update/src/mar_create.c @@ -198,7 +198,6 @@ refresh_product_info_block(const char *path, uint32_t numSignatures, additionalBlockSize, additionalBlockID, offsetAdditionalBlocks, numAdditionalBlocks, i; int additionalBlocks, hasSignatureBlock; - int64_t oldPos; rv = get_mar_file_info(path, &hasSignatureBlock, @@ -230,7 +229,7 @@ refresh_product_info_block(const char *path, for (i = 0; i < numAdditionalBlocks; ++i) { /* Get the position of the start of this block */ - oldPos = ftello(fp); + int64_t oldPos = ftello(fp); /* Read the additional block size */ if (fread(&additionalBlockSize, diff --git a/onlineupdate/source/update/updater/nsWindowsRestart.cxx b/onlineupdate/source/update/updater/nsWindowsRestart.cxx index fbc9b863c475..27fe249e429f 100644 --- a/onlineupdate/source/update/updater/nsWindowsRestart.cxx +++ b/onlineupdate/source/update/updater/nsWindowsRestart.cxx @@ -304,7 +304,6 @@ private: */ static int ArgStrLen(const wchar_t *s) { - int backslashes = 0; int i = wcslen(s); BOOL hasDoubleQuote = wcschr(s, L'"') != nullptr; // Only add doublequotes if the string contains a space or a tab @@ -315,6 +314,7 @@ static int ArgStrLen(const wchar_t *s) } if (hasDoubleQuote) { + int backslashes = 0; while (*s) { if (*s == '\\') { ++backslashes; |