From patchwork Tue Jun 10 07:54:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Carmody X-Patchwork-Id: 4327011 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E6E449F314 for ; Tue, 10 Jun 2014 07:54:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36B0520260 for ; Tue, 10 Jun 2014 07:54:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BF2D20221 for ; Tue, 10 Jun 2014 07:53:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933814AbaFJHx6 (ORCPT ); Tue, 10 Jun 2014 03:53:58 -0400 Received: from wursti.dovecot.fi ([87.106.245.223]:39518 "EHLO wursti.dovecot.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754339AbaFJHx6 (ORCPT ); Tue, 10 Jun 2014 03:53:58 -0400 Received: from phil.dovecot.net (vfw03.dovecot.fi [88.194.145.100]) by wursti.dovecot.fi (Postfix) with ESMTPSA id 9AEC221C9C; Tue, 10 Jun 2014 09:53:56 +0200 (CEST) From: Phil Carmody To: sparse@chrisli.org Cc: josh@joshtriplett.org, linux-sparse@vger.kernel.org, phil@dovecot.fi Subject: [PATCHv2 1/3] sparse: Just use simple ints for decision variables Date: Tue, 10 Jun 2014 10:54:05 +0300 Message-Id: <1402386847-23477-2-git-send-email-phil@dovecot.fi> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1402386847-23477-1-git-send-email-phil@dovecot.fi> References: <1402315082-14102-1-git-send-email-phil@dovecot.fi> <1402386847-23477-1-git-send-email-phil@dovecot.fi> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The expressions are just ints, and const is pointess. Signed-off-by: Phil Carmody --- evaluate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/evaluate.c b/evaluate.c index 6655615..9052962 100644 --- a/evaluate.c +++ b/evaluate.c @@ -917,10 +917,10 @@ static struct symbol *evaluate_binop(struct expression *expr) rtype = integer_promotion(rtype); } else { // The rest do usual conversions - const unsigned left_not = expr->left->type == EXPR_PREOP - && expr->left->op == '!'; - const unsigned right_not = expr->right->type == EXPR_PREOP - && expr->right->op == '!'; + int left_not = expr->left->type == EXPR_PREOP + && expr->left->op == '!'; + int right_not = expr->right->type == EXPR_PREOP + && expr->right->op == '!'; if ((op == '&' || op == '|') && (left_not || right_not)) warning(expr->pos, "dubious: %sx %c %sy", left_not ? "!" : "",