From patchwork Thu Oct 13 07:30:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 9374465 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A31C860839 for ; Thu, 13 Oct 2016 07:31:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 918872990A for ; Thu, 13 Oct 2016 07:31:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8656529901; Thu, 13 Oct 2016 07:31:23 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID,T_TVD_MIME_EPI 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 119B3298F9 for ; Thu, 13 Oct 2016 07:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbcJMHbU (ORCPT ); Thu, 13 Oct 2016 03:31:20 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:36455 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbcJMHbS (ORCPT ); Thu, 13 Oct 2016 03:31:18 -0400 Received: by mail-it0-f44.google.com with SMTP id l13so172347010itl.1 for ; Thu, 13 Oct 2016 00:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=AE2/uEb8CGcLNtnvVoW3hkX9JMeFVCLntSWYa+ydoAk=; b=PoHEPEp/yHuvOzGvG0ynuikvNUNUSlFdAyeDt/G8ysUPr2do6FLfIIGZfb35kedaaH FQRDmqmQihIbGyUOUbfqTVFZBoJt37i+6WaKVI5c3Z5IjB66aco2a4sc7h7fALoKMX7a Kt3kaUVkU9yVZFlazTQFQGj61I7TZPV2odoG23hHS1AkUnn1lzCVIdjy28kem/l5lMXl X9Xe8F6MJE3bStPweXZmhyt6egMwjdy+1YBBhZUVJssR4D4tu4A3AZLUkqTB+OuMD0/G ntiArEdujWxPYwmJqIxWF7aIdBQzkuLydd9hzXXtR+3a3ptoaNkGx7iTq8UkUqRXAHuc fu/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=AE2/uEb8CGcLNtnvVoW3hkX9JMeFVCLntSWYa+ydoAk=; b=eFoAYi1C94Lv4v2XDZJYS9g33q3z0aHdPyXsesBubnbzvHLqqDZeEQhr0RWKkFxVy9 6mMR0DnuPNPLaw7fa5vGJAS9MUyEu4f81BzXscNd/wlhRngHlvJiHUBNKbXpo3C78UYc OrMDsnIacZGxcrAAV7bkQ7S03EsekCXdNuS2Vb4ncyrdO2DDfs1qdtM62mHKkNkXMXGx A4kmntM/VlrJSbXneEQhds8Px38JBhoMwhHu5/O7gYGkIErCXxKyFH4XM7cYgxz6lq9I wFFp43sjcZ3oVdcUEtIH4BvaoqvkSmTl3CcqP5u+9GLFOATYINnVEssmK9cvpsjpsT9A iW3Q== X-Gm-Message-State: AA6/9RlfQl8LV1PyrxkFBzQWPZIlR1bg+S1VXKsDuA/ba1YCsU7cga5kduNNRFeFUy+Qpj76TpgyY/eoEZlsNw== X-Received: by 10.36.40.133 with SMTP id h127mr6184113ith.1.1476343843810; Thu, 13 Oct 2016 00:30:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.81.134 with HTTP; Thu, 13 Oct 2016 00:30:43 -0700 (PDT) From: Christopher Li Date: Thu, 13 Oct 2016 00:30:43 -0700 X-Google-Sender-Auth: geNUIPWDArSFUbtFzs9XMdq6fJ8 Message-ID: Subject: Review: [PATCH] Fix warning compiling sparse To: Linux-Sparse 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 Fix warning compiling sparse-llvm -pedantic in the llvm-config --cflags cause a lot of warning. Chris From 4364726646954a88a18eacfb56a9b0389e773d06 Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Thu, 29 Sep 2016 00:38:31 -0700 Subject: [PATCH] Fix warning compiling sparse-llvm -pedantic in the llvm-config --cflags cause a lot of warning. --- Makefile | 2 +- token.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c7031af..f59993f 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ ifeq ($(shell expr "$(LLVM_VERSION)" : '[3-9]\.'),2) LLVM_PROGS := sparse-llvm $(LLVM_PROGS): LD := g++ LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags) -LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g") +LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g" | sed -e "s/-pedantic//g") LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs) LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null) PROGRAMS += $(LLVM_PROGS) diff --git a/token.h b/token.h index af66b2b..f7d88eb 100644 --- a/token.h +++ b/token.h @@ -230,7 +230,7 @@ extern struct token * tokenize_buffer(void *, unsigned long, struct token **); extern void show_identifier_stats(void); extern struct token *preprocess(struct token *); -static inline int match_op(struct token *token, int op) +static inline int match_op(struct token *token, unsigned int op) { return token->pos.type == TOKEN_SPECIAL && token->special == op; } -- 2.7.4