[Scummvm-git-logs] scummvm master -> 7f9b731b165dde97a5d3ec533831d97dab431c7e

sev- noreply at scummvm.org
Sat Jun 15 22:48:12 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7f9b731b16 BASE: silence clang warning


Commit: 7f9b731b165dde97a5d3ec533831d97dab431c7e
    https://github.com/scummvm/scummvm/commit/7f9b731b165dde97a5d3ec533831d97dab431c7e
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2024-06-16T00:48:09+02:00

Commit Message:
BASE: silence clang warning

clang interprets this expression as possibly a mistaken attempt to
add a number to the string, rather than to index into the string.
Adding parens around the string silences the warning.

Changed paths:
    base/commandLine.cpp


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 96a745f2c07..4c2b527925b 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -566,12 +566,12 @@ bool ensureAccessibleDirectoryForPathOption(Common::FSNode &node,
 		usage("Non-existent path '%s' for option %s%c%s", option, \
 				isLongCmd ? "--" : "-", \
 				isLongCmd ? longCmd[0] : shortCmd, \
-				isLongCmd ? longCmd + 1 : ""); \
+				isLongCmd ? (longCmd) + 1 : ""); \
 	} else if (!ensureAccessibleDirectoryForPathOption(node, false, true, true)) { \
 		usage("Non-readable path '%s' for option %s%c%s", option, \
 				isLongCmd ? "--" : "-", \
 				isLongCmd ? longCmd[0] : shortCmd, \
-				isLongCmd ? longCmd + 1 : ""); \
+				isLongCmd ? (longCmd) + 1 : ""); \
 	} \
 	settings[longCmd] = node.getPath().toConfig();
 




More information about the Scummvm-git-logs mailing list