From patchwork Thu Nov 25 21:51:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 73123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 93EF2B70CC for ; Fri, 26 Nov 2010 08:51:33 +1100 (EST) Received: (qmail 6549 invoked by alias); 25 Nov 2010 21:51:29 -0000 Received: (qmail 6538 invoked by uid 22791); 25 Nov 2010 21:51:27 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL, BAYES_20, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pw0-f47.google.com (HELO mail-pw0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Nov 2010 21:51:23 +0000 Received: by pwi8 with SMTP id 8so346289pwi.20 for ; Thu, 25 Nov 2010 13:51:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.44.1 with SMTP id w1mr1439934wfj.447.1290721881804; Thu, 25 Nov 2010 13:51:21 -0800 (PST) Received: by 10.143.161.2 with HTTP; Thu, 25 Nov 2010 13:51:21 -0800 (PST) Date: Thu, 25 Nov 2010 22:51:21 +0100 Message-ID: Subject: [PATCH]: Prevent uninitalized warning in gengtype-state.c From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Basile Starynkevitch , Richard Guenther Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello! Profiledbootstrap breaks in gengtype-state.c, claiming that "previous" variable in read_state_structures may be uninitialized. I have committed attached patch to fix the failure. 2010-11-25 Uros Bizjak * gengtype-state.c (read_state_structures): Initialize "previous". Tested on x86_64-pc-linux-gnu {,-m32} with profiledbootstrap. Committed to SVN mainline. Uros. Index: gengtype-state.c =================================================================== --- gengtype-state.c (revision 167150) +++ gengtype-state.c (working copy) @@ -2085,7 +2085,7 @@ static void read_state_structures (type_p *structures) { type_p head = NULL; - type_p previous; + type_p previous = NULL; type_p tmp; int nbstruct = 0, countstruct = 0; struct state_token_st *t0 = peek_state_token (0);