From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28625 invoked by alias); 28 Aug 2006 20:48:14 -0000 Received: (qmail 28615 invoked by uid 22791); 28 Aug 2006 20:48:14 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 28 Aug 2006 20:48:11 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k7SKm9gA027772 for ; Mon, 28 Aug 2006 16:48:09 -0400 Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [172.16.52.227]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k7SKm96C028851 for ; Mon, 28 Aug 2006 16:48:09 -0400 Received: from greed.delorie.com (dj.cipe.redhat.com [10.0.0.222]) by post-office.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k7SKm8l21791 for ; Mon, 28 Aug 2006 16:48:08 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.13.1/8.13.1) with ESMTP id k7SKm5ES026544 for ; Mon, 28 Aug 2006 16:48:05 -0400 Received: (from dj@localhost) by greed.delorie.com (8.13.1/8.13.1/Submit) id k7SKlx1Y026282; Mon, 28 Aug 2006 16:47:59 -0400 Date: Tue, 29 Aug 2006 12:45:00 -0000 Message-Id: <200608282047.k7SKlx1Y026282@greed.delorie.com> From: DJ Delorie To: gdb-patches@sourceware.org Subject: [patch] initialize some variables in m32c-tdep.c X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00199.txt.bz2 Unless we have some magic "yes this is always initialized when used" attribute, this is needed to build this file with -Werror. * m32c-tdep.c (m32c_decode_srcdest4): Initialize fields in sd that may not be initialized elsewhere. (m32c_decode_sd23): Likewise. Index: m32c-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m32c-tdep.c,v retrieving revision 1.2 diff -p -U3 -r1.2 m32c-tdep.c --- m32c-tdep.c 13 Jul 2006 12:01:21 -0000 1.2 +++ m32c-tdep.c 28 Aug 2006 20:45:04 -0000 @@ -1196,6 +1196,9 @@ m32c_decode_srcdest4 (struct m32c_pv_sta else sd.kind = srcdest_mem; + sd.addr = pv_unknown (); + sd.reg = 0; + switch (code) { case 0x0: sd.reg = (size == 1 ? &st->r0 : &st->r0); break; @@ -1232,6 +1235,9 @@ m32c_decode_sd23 (struct m32c_pv_state * { struct srcdest sd; + sd.addr = pv_unknown (); + sd.reg = 0; + switch (code) { case 0x12: