[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] [patch #4696] Fix some C compiler warnings
From: |
z |
Subject: |
[Mldonkey-users] [patch #4696] Fix some C compiler warnings |
Date: |
Sun, 11 Dec 2005 18:46:57 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.1) |
Follow-up Comment #1, patch #4696 (project mldonkey):
I think it is bad practice to try and suppress warnings by papering over real
code problems. The warnings go away, but the bad code doesn't, and there is
no way to find this code in the future since the warning has been hidden.
Warnings can been good.
A variable named "len" with a size_t type implies that it can't be negative.
Making it 'signed' so that the warning goes away doesn't seem like the right
fix nor does it improve the code, it just hides the error.
os_stubs_c:
Hiding the fact that fd & len are not ints, but forcing the cast for the
fprintf output could make future debugging a very big pain since it is
printing incorrect values.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=4696>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/