Hello,

I think that I've spotted four minor issues in the most recent code of Viking, could you please take a look?


1. globals.c:225:

  tmp.b = VIK_GPX_EXPORT_WPT_SYM_NAME_TITLECASE;
a_preferences_register(&io_prefs[2], tmp, VIKING_PREFERENCES_IO_GROUP_KEY);

I think that the assignment should be made to tmp.u instead of tmp.i, because the parameter registered here is of type VIK_LAYER_PARAM_UINT. I'm guessing that current code works just fine because this parameter has only two allowed values (TITLECASE=0 and LOWERCASE=1).



2. globals:329 (related to #1):
This line refers to ->b field:

val = a_preferences_get(VIKING_PREFERENCES_IO_NAMESPACE "gpx_export_wpt_sym_names")->b;

The problem is that the "gpx_export_wpt_sym_names" parameter is of type VIK_LAYER_PARAM_UINT.



3. babel.c:465:

return a_babel_convert_from_shellcommand ( vt, process_options->shell_command, process_options->filename, cb, user_data, download_options );

I think that the third function argument in this function call is invalid.
Function's prototype states that the argument is 'const char *input_file_type'. Function's body shows that the function expects the argument to hold string suitable for gpsbabel's "-i" command line option. I'm not sure how to verify this in running application, so I may be totally incorrect here.



4. viktrack.c:203:

  vik_track_set_name(new_tr,tr->name);

This is a line from vik_track_copy(), we set a name of new track. The problem is that we already did this in line 182:

  new_tr->name = g_strdup(tr->name);

There is no real error because call to vik_track_set_name() in line 203 doesn't cause memory leak, but (if I see this correctly) line 203 is unnecessary.


Best regards,
Kamil

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to