[Mono-dev] Compiler warnings
Christian Hergert
chris at dronelabs.com
Tue Aug 4 21:11:16 EDT 2009
Hi,
I've split the patches up based on their content. Attached.
unused-functions.patch - #if 0 unused functions in dlmalloc.c and
strtod.c
uninitialized-fixes.patch - make sure variables are initialized with
NULL/0 where used without initialization
mono-printf-fixes.patch - make sure a format string such as "%s" is
used with variable string input printf() style methods
explicit-word-size-changes.patch - use GINT_TO_POINTER and such when
converting from int32 to word-size
declaration-fixes.patch - Fix method declarations that have ()
instead of (void) and add missing non-static declarations
bitwise-branch-checks.patch - be explicit with parenthesis when using
bitwise operation as implicit boolean
I've omitted the patch for using write() without checking the result
for now. Let me know if you want to move forward with those and how
we would want to do it properly.
Thanks,
-- Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitwise-branch-checks.patch
Type: application/octet-stream
Size: 917 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090804/659f1ef5/attachment-0006.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: declaration-fixes.patch
Type: application/octet-stream
Size: 2745 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090804/659f1ef5/attachment-0007.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: explicit-word-size-changes.patch
Type: application/octet-stream
Size: 1882 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090804/659f1ef5/attachment-0008.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono-printf-fixes.patch
Type: application/octet-stream
Size: 7044 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090804/659f1ef5/attachment-0009.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uninitialized-fixes.patch
Type: application/octet-stream
Size: 2416 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090804/659f1ef5/attachment-0010.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unused-functions.patch
Type: application/octet-stream
Size: 1632 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090804/659f1ef5/attachment-0011.obj
-------------- next part --------------
On Aug 4, 2009, at 6:11 AM, Rodrigo Kumpera wrote:
> Hi Chistian,
>
> Your patch is full of very different kind of changes, some are
> simple, others require some thought
> about. So let's sort them into smaller and centered patches.
>
> For example, the ones changing printf style calls are mostly ok and
> should be committed on their
> own. Then we can see the warnings changes, the io retry stuff and
> finally what looks like real bugs.
>
> What do you think about it?
>
> Rodrigo
>
>
> On Fri, Jul 24, 2009 at 2:02 AM, Christian Hergert <chris at dronelabs.com
> > wrote:
> Round 2,
>
> * Moved TEMP_FAILURE_RETRY macro to mono/utils/mono-io-portability.h.
> * Removed #ifndef PLATFORM_MACOSX for now.
>
> -- Christian
>
>
>
>
>
> On Jul 23, 2009, at 8:24 PM, Geoff Norton wrote:
>
> On 23-Jul-09, at 11:02 PM, Christian Hergert wrote:
>
> Hello,
>
> In an effort to get more familiar with some of the code-base, I went
> through and fixed some of the pesky compiler warnings for the
> runtime. Attached is a patch for said warnings.
>
> If anyone has suggestions on how to better fix the warnings, please
> send them my way and I'll adjust the patch as needed.
>
>
> #1: Having tons of
> +#ifndef TEMP_FAILURE_RETRY
>
> is sucky, localize it into mono/utils/somewhere-logical.h and
> include it around
>
>
> #2: lots of:
> +#ifndef PLATFORM_MACOSX
> FILE *fp;
> +#endif
>
> impedes readability (for me) just for 1 platform, not sure its worth
> it.
>
> As for the rest, it looks sane, but I'll let the runtime guys weigh
> in.
>
> -g
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
More information about the Mono-devel-list
mailing list