[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH][RFC] Fix gcc 4.x warnings (-Wpointer-sign)
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH][RFC] Fix gcc 4.x warnings (-Wpointer-sign) |
Date: |
Sat, 13 Sep 2008 20:02:52 +0300 |
On 9/13/08, Blue Swirl <address@hidden> wrote:
> On 9/12/08, M. Warner Losh <address@hidden> wrote:
> > In message: <address@hidden>
> > "Blue Swirl" <address@hidden> writes:
> > : GCC 4 enables -Wpointer-sign if -Wall is enabled. This trivial patch
> >
> > : suppresses the warnings. Comments? Objections?
> >
> >
> > Don't you mean 'fix' the warnings, since this patch looks like it
> > tries to cast things to be correct...
>
>
> Well, some parts of the patch actually fix the types so that they are
> more consistent, the casts just silence the warnings. A real fix would
> be to change the types but then it would be incorrect to change the
> signed types just to match the unsigned loadvm/savevm API.
>
> Now that I think of it, the API could be extended with signed
> versions. That would be best in terms of type safety. Maybe I'll try
> that approach instead.
The first patch adds signed versions. This cleans up some parts
because casts are no longer needed.
The second patch fixes other warnings by making the types more
consistent, like before.
signed_savevm_api.diff
Description: plain/text
fix_signed_warnings.diff
Description: plain/text