diff mbox series

[5/9] pre-process: don't put spaces in macro parameter list

Message ID 59e0760f-68af-099a-cb54-cbe4bad8cd54@ramsayjones.plus.com (mailing list archive)
State Mainlined, archived
Headers show
Series misc sparse patches | expand

Commit Message

Ramsay Jones Nov. 19, 2018, 8:50 p.m. UTC
The dump_macros() function adds a ", " separator between the arguments
of a function-like macro. Using a simple "," separator, which aligns the
output with gcc, leads to one less distraction when comparing the output
of sparse and gcc.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 pre-process.c                         | 2 +-
 validation/preprocessor/dump-macros.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/pre-process.c b/pre-process.c
index eca7ab5..7b76c65 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -2184,7 +2184,7 @@  static void dump_macro(struct symbol *sym)
 				continue;
 			printf("%s%s", sep, show_token(token));
 			args[narg++] = token;
-			sep = ", ";
+			sep = ",";
 		}
 		putchar(')');
 	}
diff --git a/validation/preprocessor/dump-macros.c b/validation/preprocessor/dump-macros.c
index 5a96464..f8983d8 100644
--- a/validation/preprocessor/dump-macros.c
+++ b/validation/preprocessor/dump-macros.c
@@ -19,5 +19,5 @@  check-output-contains: #define IJK ijk
 check-output-contains: #define DEF xyz
 check-output-contains: #define NYDEF ydef
 check-output-contains: #define STRING(x) #x
-check-output-contains: #define CONCAT(x, y) x ## y
+check-output-contains: #define CONCAT(x,y) x ## y
  */