|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
libc warnings/fixHi,
I have one more patch [1] to fix three "may be used uninitialized in this function" warnings emitted by newer gcc. All three are unlikely to cause any problems [obviously], but are perfectly valid from compiler's standpoint. [1]: http://koowaldah.org/people/ash/netbsd/fix-libc-warnings.patch Regards, -- Alex |
|
|
Re: libc warnings/fixIn article <20080724074745.GI22423@...>,
Alexander Shishkin <alexander.shishkin@...> wrote: >Hi, > >I have one more patch [1] to fix three "may be used uninitialized in this >function" warnings emitted by newer gcc. All three are unlikely to cause >any problems [obviously], but are perfectly valid from compiler's >standpoint. > >[1]: http://koowaldah.org/people/ash/netbsd/fix-libc-warnings.patch > Why? The first two seem like compiler regressions and the compiler should be able to figure out. The third is more difficult for the compiler to figure out, so it is acceptable. christos |
|
|
Re: libc warnings/fixOn Thu, Jul 24, 2008 at 08:24:47PM +0000, Christos Zoulas wrote:
> In article <20080724074745.GI22423@...>, > Alexander Shishkin <alexander.shishkin@...> wrote: > >Hi, > > > >I have one more patch [1] to fix three "may be used uninitialized in this > >function" warnings emitted by newer gcc. All three are unlikely to cause > >any problems [obviously], but are perfectly valid from compiler's > >standpoint. > > > >[1]: http://koowaldah.org/people/ash/netbsd/fix-libc-warnings.patch Save us by inlining patches that are that short... > Why? The first two seem like compiler regressions and the compiler should > be able to figure out. The third is more difficult for the compiler to figure > out, so it is acceptable. I guess the first is because the compiler has detected that 'get_shared' doesn't set '*rci' in all paths. Similarly for '*variable' in lookup_mapper_entry. David -- David Laight: david@... |
|
|
Re: libc warnings/fixOn Thu, Jul 24, 2008 at 11:41 PM, David Laight <david@...> wrote:
>> >[1]: http://koowaldah.org/people/ash/netbsd/fix-libc-warnings.patch > Save us by inlining patches that are that short... I don't understand your optimism. 1. some_type *ci; ... ret = get_shared(&ci, ...); How could you guess about usage of the **ci? Indeed get_shared() doesn't care about contains of **rci in some branches. 2. The same behaviour for lookup_mapper_entry() and **variable. 3. Probably compilator regression is occur. I think the gcc is right in 1. and 2. predictions. -- With Best Regards, Andy Shevchenko |
|
|
Re: libc warnings/fixOn Jul 25, 12:31pm, andy.shevchenko@... ("Andy Shevchenko") wrote:
-- Subject: Re: libc warnings/fix | On Thu, Jul 24, 2008 at 11:41 PM, David Laight <david@...> wrote: | >> >[1]: http://koowaldah.org/people/ash/netbsd/fix-libc-warnings.patch | > Save us by inlining patches that are that short... | I don't understand your optimism. | | 1. | some_type *ci; | ... | ret = get_shared(&ci, ...); | | How could you guess about usage of the **ci? | Indeed get_shared() doesn't care about contains of **rci in some branches. Then it returns non zero, and the calling code does not use rci. | 2. The same behaviour for lookup_mapper_entry() and **variable. Again same I guess. | 3. Probably compilator regression is occur. | | I think the gcc is right in 1. and 2. predictions. I will apply the patches. christos |
| Free Forum Powered by Nabble | Forum Help |