All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] runner: Avoid compilation failure on c17 and earlier
@ 2026-06-02  7:32 Zbigniew Kempczyński
  2026-06-02  8:04 ` Sebastian Brzezinka
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Zbigniew Kempczyński @ 2026-06-02  7:32 UTC (permalink / raw)
  To: igt-dev; +Cc: Zbigniew Kempczyński, Krzysztof Karas

Older compilers don't allow to define variables within switch/goto.
Move these definition to avoid compilation break.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Krzysztof Karas <krzysztof.karas@intel.com>
---
 runner/resultgen.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index a1938b3f65..b6d977f72a 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -1163,6 +1163,9 @@ static int ftw_attachments_list(const char *fpath, const struct stat *sb,
 				int typeflag, struct FTW *ftwbuf)
 {
 	struct json_t *obj = NULL, *attobj = NULL;
+	const char *attdirkey = "attachments-dir";
+	char *p, *currpath = (char *) fpath + 2;
+	char currdir[PATH_MAX];
 
 	(void)sb;
 	(void)ftwbuf;
@@ -1181,10 +1184,6 @@ static int ftw_attachments_list(const char *fpath, const struct stat *sb,
 	 * Instead of duplicating string we temporarily overwrite '/' with '\0'.
 	 */
 	case FTW_F:
-		const char *attdirkey = "attachments-dir";
-		char *p, *currpath = (char *) fpath + 2;
-		char currdir[PATH_MAX];
-
 		p = strstr(currpath, "/");
 		if (!p)
 			return -1;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-03  8:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02  7:32 [PATCH i-g-t] runner: Avoid compilation failure on c17 and earlier Zbigniew Kempczyński
2026-06-02  8:04 ` Sebastian Brzezinka
2026-06-02 10:18 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-06-02 10:25 ` ✓ i915.CI.BAT: " Patchwork
2026-06-02 17:28 ` ✓ i915.CI.Full: " Patchwork
2026-06-02 17:40 ` ✓ Xe.CI.FULL: " Patchwork
2026-06-03  8:44 ` [PATCH i-g-t] " Krzysztof Karas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.