Skip to content

Commit

Permalink
misc cleanups from clion. (GPSBabel#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 authored May 29, 2022
1 parent a6785e5 commit d926831
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 23 deletions.
6 changes: 0 additions & 6 deletions defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,6 @@ int xasprintf(QScopedPointer<char, QScopedPointerPodDeleter>& strp, const char*
int xvasprintf(char** strp, const char* fmt, va_list ap);
char* strupper(char* src);
char* strlower(char* src);
signed int get_tz_offset();
time_t mklocaltime(struct tm* t);
time_t mkgmtime(struct tm* t);
bool gpsbabel_testmode();
Expand Down Expand Up @@ -1191,11 +1190,6 @@ int parse_speed(const QString& str, double* val, double scale, const char* modul
*/
unsigned long get_crc32(const void* data, int datalen);

/*
* From nmea.c
*/
int nmea_cksum(const char* buf);

/*
* Color helpers.
*/
Expand Down
1 change: 0 additions & 1 deletion garmin_txt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ static int header_fields[unknown_header + 1][MAX_HEADER_FIELDS];
static int header_ct[unknown_header + 1];

#define GARMIN_UNKNOWN_ALT 1.0e25f
#define DEFAULT_DISPLAY garmin_display_symbol_and_name
#define DEFAULT_DATE_FORMAT "dd/mm/yyyy"
#define DEFAULT_TIME_FORMAT "HH:mm:ss"

Expand Down
2 changes: 1 addition & 1 deletion globalsat_sport.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ class GlobalsatSportFormat : public Format
{"timezone", &opt_timezone, "Time zone ID", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
};
};
#endif // GPX_H_INCLUDED_
#endif // GLOBALSATSPORT_H_INCLUDED_
4 changes: 2 additions & 2 deletions html.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ HtmlFormat::html_disp(const Waypoint* wpt) const
gbfprintf(file_out, "<br>\n");
if (wpt->description != wpt->shortname) {
if (wpt->HasUrlLink()) {
char* d = html_entitize(CSTR(wpt->description));
char* d = html_entitize(wpt->description);
UrlLink link = wpt->GetUrlLink();
gbfprintf(file_out, "<a href=\"%s\">%s</a>", CSTR(link.url_), d);
xfree(d);
Expand Down Expand Up @@ -139,7 +139,7 @@ HtmlFormat::html_disp(const Waypoint* wpt) const

logpart = xml_findfirst(curlog, "groundspeak:finder");
if (logpart) {
char* f = html_entitize(CSTR(logpart->cdata));
char* f = html_entitize(logpart->cdata);
gbfprintf(file_out, "<span class=\"gpsbabellogfinder\">%s</span> on ", f);
xfree(f);
}
Expand Down
2 changes: 1 addition & 1 deletion jeeps/gpsdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
gps_device_op12 Write_Packet;
} gps_device_ops;

#endif /* gpsdevice.h */
#endif /* gpsdevice_h */
2 changes: 1 addition & 1 deletion jeeps/gpslibusb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ garmin_usb_start(struct libusb_device* dev,
if (ret != LIBUSB_SUCCESS) {
fatal("libusb_set_configuration failed: %s\n",
libusb_strerror(static_cast<enum libusb_error>(ret)));
};
}
#endif

#if 0
Expand Down
2 changes: 1 addition & 1 deletion navilink.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ typedef struct __packed {

#endif

#endif // NAVILINK_H_INCLUDED
#endif // NAVILINK_H_INCLUDED_
2 changes: 0 additions & 2 deletions raymarine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
#include <cstdio>
#include <cstdlib>

using guid_t = unsigned long long;

static inifile_t* fin;
static gbfile* fout;
static Waypoint** waypt_table;
Expand Down
2 changes: 0 additions & 2 deletions smplrout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
#if FILTERS_ENABLED
#define MYNAME "simplify"

#define sqr(a) ((a)*(a))

void SimplifyRouteFilter::free_xte(struct xte* xte_rec)
{
delete xte_rec->intermed;
Expand Down
6 changes: 0 additions & 6 deletions util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,6 @@ si_round(double d)
works just like mktime but without all the mucking
around with timezones and daylight savings
obsoletes get_tz_offset()
Borrowed from lynx GPL source code
http://lynx.isc.org/release/lynx2-8-5/src/mktime.c
Expand Down Expand Up @@ -1456,10 +1454,6 @@ char* xml_entitize(const char* str)
return entitize(str, false);
}

char* html_entitize(const char* str)
{
return entitize(str, true);
}
char* html_entitize(const QString& str)
{
return entitize(CSTR(str), true);
Expand Down

0 comments on commit d926831

Please sign in to comment.