From patchwork Mon Nov 19 20:50:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 10689425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 999A513AD for ; Mon, 19 Nov 2018 20:50:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B22E2A382 for ; Mon, 19 Nov 2018 20:50:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F88F2A3C8; Mon, 19 Nov 2018 20:50:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27A352A598 for ; Mon, 19 Nov 2018 20:50:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730827AbeKTHQD (ORCPT ); Tue, 20 Nov 2018 02:16:03 -0500 Received: from avasout04.plus.net ([212.159.14.19]:52614 "EHLO avasout04.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730797AbeKTHQD (ORCPT ); Tue, 20 Nov 2018 02:16:03 -0500 Received: from [10.0.2.15] ([146.198.133.33]) by smtp with ESMTPA id OqVDg9pbcYyh2OqVEgYm3Y; Mon, 19 Nov 2018 20:50:40 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=MoN8FVSe c=1 sm=1 tr=0 a=VCDsReDbrwk4B7AcQzWGLw==:117 a=VCDsReDbrwk4B7AcQzWGLw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=atKj8sqwZLVGDhMdaiMA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: Luc Van Oostenryck Cc: Sparse Mailing-list From: Ramsay Jones Subject: [PATCH 5/9] pre-process: don't put spaces in macro parameter list Message-ID: <59e0760f-68af-099a-cb54-cbe4bad8cd54@ramsayjones.plus.com> Date: Mon, 19 Nov 2018 20:50:37 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfMsrqysUHaZgVGiWdCb90pUmxVdbR06RR95tisRPO3xTb7JDFl+kBVJxl6oKf5L1s0/CaW78T9NDX/Al+sC/HrTPW1GaJ4I4CLbaCE9yRzFPToNyLE2x lwrn310sr8ebS/7MYwWT8IPlZy2x6Igmlg/t+7oaDyGlMMjMKBwF0gge1wDtg1R2yNv1+KgTQS/eKw== Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- pre-process.c | 2 +- validation/preprocessor/dump-macros.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 */