[patch] 1.11.0.svn: compiler warnings when building for i386 arch
Denys Vlasenko
vda.linux at googlemail.com
Tue May 13 02:26:27 UTC 2008
On Monday 12 May 2008 23:50, Cristian Ionescu-Idbohrn wrote:
> On Mon, 12 May 2008, Denys Vlasenko wrote:
>
> > Patch is applied with minor corrections, thanks.
>
> Sorry, but I'm a bit confused. After synchning with svn i still find some
> 26 files not being touched :(
That was a different patch, which I didn't reviewed yet.
> I may be missing something or you may not have seen those. Attaching
> another diff.
- return (sb.st_uid == user_id);
+ return (sb.st_uid == (__uid_t)user_id);
why not uid_t?
- if (size != count)
+ if (size - count != 0)
- if (p - buf == sz) {
+ if (p - buf - sz == 0) {
- if (size != count)
+ if (size - count != 0) //vda:FIX (size - count != 0)
this suppresses the warning, but obfuscates the code :(
- for (i = 0; i < ARRAY_SIZE(signals); i++)
+ for (i = 0; (size_t)i < ARRAY_SIZE(signals); i++)
oh my. gcc warns about this?
- if (sed_cmd->which_match && sed_cmd->which_match != match_count) {
+ if (sed_cmd->which_match
+ && (sed_cmd->which_match != match_count)) {
what is fixed here?
if ((hp->h_length < 0)
|| ((size_t)hp->h_length > sizeof(struct in_addr))) {
if hp->h_length < 0, them (size_t)hp->h_length will be a big positive number...
you can just do
if ((size_t)hp->h_length > sizeof(struct in_addr)) {
I think I applied all of them to svn, let me know if I missed anything.
--
vda
More information about the busybox
mailing list