tsp-devel
[Top][All Lists]
Advanced

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

[Tsp-devel] [PATCH] Fix compilation warnings


From: Robert de Vries
Subject: [Tsp-devel] [PATCH] Fix compilation warnings
Date: Tue, 6 Nov 2007 23:19:26 +0100

Hi all,

I got a bit annoyed by all the compiler warnings of tsp so I sat down
and fixed most of them.
I did not fix the compiler warnings on the generated rpc xdr code.
I did not fix one cast from a pointer to an int in
tsp/src/core/ctrl/tsp_group_algo.c:335: warning: assignment makes
pointer from integer without a cast

All the other warnings I fixed.
Most of them required a couple of casts from char * to xmlChar * or vice versa.
I used some macro's to make them stand out.
Some other warnings could simply be fixed by changing the type of the
variable to the correct type.
One unused variable.
Two unused functions.
One of them I have placed between #ifdef DEBUG_2D (gdisp_plot2D.c)
And one I decided to call: gdisp_freeSymbolsForSampling() in
gdisp+/gdisp_sampling.c
The companion function gdisp_allocateSymbolsForSampling() was called,
but the other wasn't.
This is the only fix that might not work as it seems that the free
function was only programmed and never actually called since version
1.1 of that file.

If someone thinks this is a good patch, let them commit the patch (or
tell me to do so).

It would be nice if an actual cmake user would remove the -W -Wall
flag for the compilation of the generated code. This would only leave
one warning message. (for erk)

    Robert

Attachment: fix_warnings.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]