alidiepuit / osmtracker-android

Automatically exported from code.google.com/p/osmtracker-android
GNU General Public License v3.0
0 stars 0 forks source link

Suppress warnings in the code #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've set up the project in Eclipse, all works fine but I get 34 warning 
messages, all about:
- constructors never used locally
- fields never read locally
- imports never used
- local variables never read
- methods never used locally

I am sure some of those warnings could be fixed, so that the quality of the 
code can be improved (and potential bugs prevented). Attached is a CSV file 
containing all the warnings detected by Eclipse as of r206.

Original issue reported on code.google.com by emilien.klein on 27 Sep 2010 at 6:57

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately the majority of these warning, are coming from the OsmDroid 
source code that is used to display OSM tiles as background (See issue #19).
I try to fix all warning in my source code whenever possible, the remaining 
ones are mostly unused variables that are used when developing (such as TAG 
constants for logging). It's handy to have them here instead of re-creating 
them each time you want to log something.

Ideally I'd like to switch to using a JAR from OsmDroid (See issue #46), 
instead of including parts of their source code, but it was the only solution 
at the time OSM background was implemented by viesturz.

Original comment by nguillau...@gmail.com on 28 Sep 2010 at 9:37

GoogleCodeExporter commented 9 years ago
Indeed a lot of those errors are from AndNav. Removing the TAG constants, we're 
left with 2 unused imports and 2 unread local variables (which I think can be 
fixed)

The import android.R.color is never 
used    TracklistAdapter.java   /osmtracker-android/src/me/guillaumin/android/osmtrac
ker/db
The import java.nio.channels.UnsupportedAddressTypeException is never 
used    TrackContentProvider.java   /osmtracker-android/src/me/guillaumin/android/osm
tracker/db
The local variable sat is never 
read    GpsStatusRecord.java    /osmtracker-android/src/me/guillaumin/android/osmtrack
er/layout
The local variable table is never 
read    TrackContentProvider.java   /osmtracker-android/src/me/guillaumin/android/osm
tracker/db

Original comment by emilien.klein on 28 Sep 2010 at 11:15