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

[ gpsdrive ] List of warnings getting longer.



Hi Guys,
(As always this is not critisism just observation)

I redirected the std error from a make and I notice a lot of warnings
and I think the list is steadly growing   Having warnings that hang
around all the time even if they don't cause any problems directly can
tend to mask new warnings that are causing problems.

<Soapbox>
Some people think Ahhhhh they are just warnings.
Don't forget the compiler is saying "You can do this if you really want
to but are you sure you want to?"
My Opinion Warnings = bad
</Soapbox>   :)

This may be important as we have some long term bugs haging around and
just maybe some of those warnings are part of the problem.

Here are two that ring an alarm bell for me.

map_projection.c:163: warning: 'lon' may be used uninitialized in this
function
map_projection.c:163: warning: 'lat' may be used uninitialized in this
function

My C isn't much good but doesn't this mean that lat/log could start off
holding some bizare random(ish) number?

Anyone game to look into them?
=========================================================================
david@debian:~/build/gpsdrive/trunk$ more error.txt
gpsdrive.c: In function 'main':
gpsdrive.c:4866: warning: dereferencing type-punned pointer will break
strict-aliasing rules
gpsdrive.c:4870: warning: dereferencing type-punned pointer will break
strict-aliasing rules
gpsdrive.c:4885: warning: dereferencing type-punned pointer will break
strict-aliasing rules
gpsdrive.c:4889: warning: dereferencing type-punned pointer will break
strict-aliasing rules
gpsdrive.c:5214: warning: implicit declaration of function
'get_poi_type_id_for_wlan'
gpsdrive.c:4308: warning: unused variable 'vbox_wlan'
poi.c: In function 'poi_rebuild_list':
poi.c:351: warning: unused variable 'sql_in'
poi.c:350: warning: unused variable 'sql_where'
wlan.c: In function 'wlan_draw_list':
wlan.c:517: warning: implicit declaration of function 'draw_text'
settings.c: In function 'change_font_callback':
settings.c:217: warning: passing argument 2 of
'gtk_font_selection_dialog_set_font_name' from incompatible pointer type
settings.c:223: warning: passing argument 2 of
'gtk_font_selection_dialog_set_font_name' from incompatible pointer type
settings.c:241: warning: passing argument 1 of 'g_strlcpy' from
incompatible pointer type
settings.c:246: warning: passing argument 1 of 'g_strlcpy' from
incompatible pointer type
map_handler.c: In function 'test_and_load_newmap':
map_handler.c:861: warning: 'posy' may be used uninitialized in this
function
map_handler.c:861: warning: 'posx' may be used uninitialized in this
function
import_map.c: In function 'import1_cb':
import_map.c:316: warning: 'knopf_scale_finish' may be used
uninitialized in this function
map_projection.c: In function 'calcxytopos':
map_projection.c:163: warning: 'lon' may be used uninitialized in this
function
map_projection.c:163: warning: 'lat' may be used uninitialized in this
function
==========================================================================

-- 
This message was part of the gpsdrive mailinglist
unsubscribing can be done by sending a mail containing a body of:
-quote--
unsubscribe gpsdrive
-unquote--
to majordomo@warbase.selwerd.nl