Skip to content

Commit

Permalink
use streams for garmin_fit debug messages. (GPSBabel#795)
Browse files Browse the repository at this point in the history
* use streams for garmin_fit debug messages.

This eliminates the Qt 6 warnings related to the change in types
for container sizes and the format specifier.

* retire debug_print()

* make logging debug single arg ctors explicit
  • Loading branch information
tsteven4 authored Dec 15, 2021
1 parent 541ae21 commit e756b86
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 78 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ set(SUPPORT
rgbcolors.cc
route.cc
session.cc
src/core/logging.cc
src/core/nvector.cc
src/core/textstream.cc
src/core/usasciicodec.cc
Expand Down
1 change: 1 addition & 0 deletions GPSBabel.pro
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ SUPPORT = \
rgbcolors.cc \
route.cc \
session.cc \
src/core/logging.cc \
src/core/nvector.cc \
src/core/textstream.cc \
src/core/usasciicodec.cc \
Expand Down
1 change: 0 additions & 1 deletion defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,6 @@ extern const QVector<style_vecs_t> style_list;
[[noreturn]] void fatal(const char*, ...) PRINTFLIKE(1, 2);
void is_fatal(int condition, const char*, ...) PRINTFLIKE(2, 3);
void warning(const char*, ...) PRINTFLIKE(1, 2);
void debug_print(int level, const char* fmt, ...) PRINTFLIKE(2,3);

void printposn(double c, int is_lat);

Expand Down
13 changes: 0 additions & 13 deletions fatal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,3 @@ warning(const char* fmt, ...)
vfprintf(stderr, fmt, ap);
va_end(ap);
}

void
debug_print(int level, const char* fmt, ...)
{
va_list ap;
for (int i = 1; i<level; i++) {
fprintf(stderr, ".");
}
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}

Loading

0 comments on commit e756b86

Please sign in to comment.