This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdb under solaris7


Nick Duffek wrote:

> remote.c:
> >!   scan = (char *) ref;
> [...]
> >!   scan = (unsigned char *) ref;
> 
> Looks right.

? :-)

Hmm, many of the remote.c changes look wierd :-).  Simply type casting
something to avoid a warning tend to hide a more serious underlying
problem.  For instance:

> remote.c:
> >!       pkt = unpack_int (pkt, &tag);  /* tag */
> [...]
> >!       pkt = unpack_int (pkt, (int *)&tag);   /* tag */
> 
> How about declaring tag as an int instead?  Better not to use typecasts
> when easily avoidable, I think.  Andrew?

TAG should have the correct type for the reference parameter.  The cast
shouldn't be needed.

Could I suggest going back through and re-thinking any changes that
involve casts.

	enjoy,
		Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]