Skip to contentSkip to conversation

selftests/filesystems: replace typeof() with __auto_type

PATCH New Pranav Tyagi 1 participant 1 message Aug 6, 2025 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/filesystems: replace typeof() with __auto_type

Replace typeof() with __auto_type in utils.c.
__auto_type was introduced in GCC 4.9 and reduces the compile time for all compilers. No functional changes intended.

---
 tools/testing/selftests/filesystems/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/filesystems/utils.c +1 -1
index c43a69dffd83..95f202e2bfb7 100644
@@ -34,7 +34,7 @@
 
 #define syserror_set(__ret__, format, ...)                    \
 	({                                                    \
-		typeof(__ret__) __internal_ret__ = (__ret__); \
+		__auto_type __internal_ret__ = (__ret__);       \
 		errno = labs(__ret__);                        \
 		fprintf(stderr, "%m - " format "\n", ##__VA_ARGS__);       \
 		__internal_ret__;                             \
Signature · 1 line
2.49.0