Commit 17da60068da2bfbc1a3d1ea53a6f7717125bad94

Ozkan Sezer 2022-01-09T20:33:32

os2joystick: fix -Wsequence-point issues.

diff --git a/src/joystick/os2/SDL_os2joystick.c b/src/joystick/os2/SDL_os2joystick.c
index b92c16b..5d39df8 100644
--- a/src/joystick/os2/SDL_os2joystick.c
+++ b/src/joystick/os2/SDL_os2joystick.c
@@ -708,10 +708,18 @@ static int joyGetEnv(struct _joycfg * joydata)
 	while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */
 
 	/* If the string name starts with '... get if fully */
-	if (*joyenv == '\'') joyenv += joyGetData(++joyenv,joydata->name,'\'',sizeof(joydata->name));
+	if (*joyenv == '\'') {
+		joyenv++;
+		joyenv += joyGetData(joyenv,joydata->name,'\'',sizeof(joydata->name));
+	}
 	/* If not, get it until the next space */
-	else if (*joyenv == '\"') joyenv += joyGetData(++joyenv,joydata->name,'\"',sizeof(joydata->name));
-	else joyenv += joyGetData(joyenv,joydata->name,' ',sizeof(joydata->name));
+	else if (*joyenv == '\"') {
+		joyenv++;
+		joyenv += joyGetData(joyenv,joydata->name,'\"',sizeof(joydata->name));
+	}
+	else {
+		joyenv += joyGetData(joyenv,joydata->name, ' ',sizeof(joydata->name));
+	}
 
 	/* Now get the number of axes */
 	while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */