[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08 of 22] eliminated gcc-4 compilation warnings

John H. Robinson, IV wrote:
> # HG changeset patch
> # User Dan Pascu <dan@ag-projects.com>
> # Date 1124755099 25200
> # Branch wm_0_92
> # Node ID 345324c47d750b7f1847e926c50f8e044eb4a24f
> # Parent  6f8b21fc008fe3618a793761b2a9191bb433140f

> eliminated gcc-4 compilation warnings

Ok, so I have a problem with commit logs like this! :-)

IMHO a commit which fixes compilation warnings should
explicitly mention what those warnings are in the first
place. That way people trying to review it know what
the intentions were from the start.

I say this because I got curious about how to fix compilation
warnings in general and wanted to learn from other people fixes,
especially the ones which are highly experienced like Dan.

Ok, so not knowing what the warnings were I simply reverted
this commit in my git tree and compiled it again (using
gcc 4.2.3 in 64-bit cpu). For my surprise only one warning
was added this way (of course it may add more warnings with
other gcc versions and/or 32-bit/64-bit)

startup.c: In function 'StartUp':
startup.c:613: warning: incompatible implicit declaration of built-in function 'memset'

which is fixed by this particular change here

> --- a/src/startup.c	Mon Aug 22 12:07:57 2005 -0700
> +++ b/src/startup.c	Mon Aug 22 16:58:19 2005 -0700
> @@ -25,6 +25,7 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <unistd.h>
> +#include <string.h>
>  #include <errno.h>
>  #include <signal.h>
>  #include <sys/wait.h>

All the other changes which were reverted did not introduce
warnings, so I was left wondering what these were :-)

To unsubscribe, send mail to wmaker-dev-unsubscribe@lists.windowmaker.info.