From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23751 invoked by alias); 18 May 2003 15:11:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23734 invoked from network); 18 May 2003 15:11:22 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 18 May 2003 15:11:22 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19HPpH-0002KB-00; Sun, 18 May 2003 10:11:51 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19HPok-0004Rr-00; Sun, 18 May 2003 11:11:18 -0400 Date: Sun, 18 May 2003 15:11:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFA] Fix size_t related problems in dwarf2loc.c Message-ID: <20030518151118.GA17081@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sources.redhat.com References: <200305181026.h4IAQ1Kv031019@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200305181026.h4IAQ1Kv031019@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00319.txt.bz2 On Sun, May 18, 2003 at 12:26:01PM +0200, Mark Kettenis wrote: > I got a few warnings on hppa1.1-hp-hpux-11.00. Anyway, a size_t isn't > necessarily the same as an int. OK to apply? I think this counts as an obvious fix... > > Mark > > Index: ChangeLog > from Mark Kettenis > > * dwarf2loc.c (find_location_expression): Change type of second > argument to `size_t *'. > (loclist_read_variable, loclist_tracepoint_var_ref): Use size_t > for size variable. > > Index: dwarf2loc.c > =================================================================== > RCS file: /cvs/src/src/gdb/dwarf2loc.c,v > retrieving revision 1.7 > diff -u -p -r1.7 dwarf2loc.c > --- dwarf2loc.c 22 Apr 2003 23:18:26 -0000 1.7 > +++ dwarf2loc.c 18 May 2003 10:24:39 -0000 > @@ -50,7 +50,7 @@ > > static char * > find_location_expression (struct dwarf2_loclist_baton *baton, > - int *locexpr_length, CORE_ADDR pc) > + size_t *locexpr_length, CORE_ADDR pc) > { > CORE_ADDR base_address = baton->base_address; > CORE_ADDR low, high; > @@ -448,7 +448,7 @@ loclist_read_variable (struct symbol *sy > struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); > struct value *val; > unsigned char *data; > - int size; > + size_t size; > > data = find_location_expression (dlbaton, &size, > frame ? get_frame_pc (frame) : 0); > @@ -490,7 +490,7 @@ loclist_tracepoint_var_ref (struct symbo > { > struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); > unsigned char *data; > - int size; > + size_t size; > > data = find_location_expression (dlbaton, &size, ax->scope); > if (data == NULL) > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer