[PATCH] Miscellaneous compilation warning fixes

Aaron Plattner aplattner at nvidia.com
Tue Dec 8 17:33:36 PST 2009


On Tue, Dec 08, 2009 at 03:54:18PM -0800, Jeremy Huddleston wrote:
> main.c:134: warning: no previous prototype for 'dix_main'
> rootlessScreen.c: In function 'RootlessMarkOverlappedWindows':
> rootlessScreen.c:434: warning: function declaration isn't a prototype
> backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
> backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
> set.c: In function 'RecordSetMemoryRequirements':
> set.c:413: warning: old-style function definition
> set.c: In function 'RecordCreateSet':
> set.c:425: warning: old-style function definition
> stub.c: In function 'main':
> stub.c:236: warning: ISO C90 forbids mixed declarations and code
> 
> Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
> ---
>  dix/main.c                      |    2 ++
>  hw/xquartz/mach-startup/stub.c  |    3 ++-
>  miext/rootless/rootlessScreen.c |    2 +-
>  os/backtrace.c                  |    4 ++--
>  record/set.c                    |   11 ++---------
>  5 files changed, 9 insertions(+), 13 deletions(-)
> 
> diff --git a/dix/main.c b/dix/main.c
> index f96245a..a875d12 100644
> --- a/dix/main.c
> +++ b/dix/main.c
> @@ -127,6 +127,8 @@ BOOL serverInitComplete = FALSE;
>  pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
>  pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
>  
> +int dix_main(int argc, char *argv[], char *envp[]);
> +

This should be declared in a header somewhere, not copied & pasted.


More information about the xorg-devel mailing list