From patchwork Tue Jul 18 02:56:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 9846693 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 00D0460212 for ; Tue, 18 Jul 2017 02:56:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04C0426256 for ; Tue, 18 Jul 2017 02:56:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE00B26E1A; Tue, 18 Jul 2017 02:56:40 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 81B5826256 for ; Tue, 18 Jul 2017 02:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbdGRC4k (ORCPT ); Mon, 17 Jul 2017 22:56:40 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35373 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbdGRC4j (ORCPT ); Mon, 17 Jul 2017 22:56:39 -0400 Received: by mail-pf0-f194.google.com with SMTP id q85so987204pfq.2 for ; Mon, 17 Jul 2017 19:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=NmxxtZNmatiGk81CbaX8UqQYFu6g0vUbPjw+fBTLStY=; b=QeSJYYjAEQxCK5L7n082QnNfY85HwiNdlId47y3jBCO372Fpb59xhMBvlVI8avRUP7 Ce/m3QLG2lNB+EbQcYnpLe3nZ/4n6mndFt0TOvXKDn9MmamBQ/AIhjP2D0+YApzKj97k abVlS0pJKabwjIUnwJVOVBbO/Ba76k0/5NPaulVCYvfEGVS76ZPzDT9yGYYOcD2W5p9p VzTiRLh8RkF02pHLXaSpH4N4eAgnYEsNOBmk+9dNYbWvEP3pxSoGq63TSRlujnnaZEt6 prSUVMr6IMabjTyiXrVGFH75zbvxyMgv7HBxXy1EgPV9QabgSiIM7mRoSwEDbHFy0RiY RVrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=NmxxtZNmatiGk81CbaX8UqQYFu6g0vUbPjw+fBTLStY=; b=AowjFfpq4jNjzSnwLFmIUh1g6O8hBJMLKa/jree1KCJIP1r8kSRmwiWCRnsFQK8vIX Z7nkiIZjW1KdKEkIok7DaxfUGcuf08dYX9Q0DHPcAPp4+ycynwBvlBZxHFrE9b8vkIZM UKGdE17pu7oBgcMNIXgsVF57kUQcvfIJwbiPM6JTdKEzOnbEsI9SkYv0bNwGUhxlSxg9 krlCXA6m2xR0RhoS4UUzHEokEbUFQxLFKSnfbtHNcUzjq9sO7GgTVHWELVFI5wBEMNyg p7aeTrYUl9QdSLHVDtL+yHMXrl0D3lbEhYjNMOruXg+72UHicmshZni6U7QVeBCOm0mf bgQA== X-Gm-Message-State: AIVw1131iug1WO/822R+vthUHc2+VbhGl4bgwUcRdXemon4PQcKz5iS5 VPk6eiNfs1l7TCSHEbwkYjpMLRahncGP X-Received: by 10.98.112.137 with SMTP id l131mr746400pfc.194.1500346599104; Mon, 17 Jul 2017 19:56:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.149.130 with HTTP; Mon, 17 Jul 2017 19:56:38 -0700 (PDT) From: Christopher Li Date: Mon, 17 Jul 2017 22:56:38 -0400 X-Google-Sender-Auth: 4im18FScooYooHfQxxIhdjAPIrE Message-ID: Subject: [PATCH 4/4] V2 fix warnings report by selfcheck To: Linux-Sparse , Ramsay Jones 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 Signed-off-by: Christopher Li --- ast-model.c | 2 +- ast-view.c | 3 ++- lib.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ast-model.c b/ast-model.c index 704c487..63d2762 100644 --- a/ast-model.c +++ b/ast-model.c @@ -59,7 +59,7 @@ AstNode* ast_nth_child(AstNode *node, int n) inspect_child_node(node); if (n >= node->childnodes->len) - return FALSE; + return NULL; return g_array_index(node->childnodes, AstNode *, n); } diff --git a/ast-view.c b/ast-view.c index c2b3963..22aba11 100644 --- a/ast-view.c +++ b/ast-view.c @@ -2,8 +2,9 @@ #include #include "ast-model.h" #include "ast-inspect.h" +#include "ast-view.h" -GtkWidget * +static GtkWidget * create_view_and_model (void *ptr) { GtkTreeViewColumn *text; diff --git a/lib.h b/lib.h index 3f8d361..c90e0e3 100644 --- a/lib.h +++ b/lib.h @@ -150,6 +150,7 @@ extern int fdump_linearize; extern unsigned long long fmemcpy_max_count; extern int arch_m64; +extern int arch_msize_long; extern int arch_big_endian; extern void declare_builtin_functions(void);