warnings: Fix a bunch of warnings

This is in prep to turn on more warnings.

  - Stop using libusb_set_debug, according to the deprecation warning for
    libusb.
  - Return correctly in G13_Manager::run
  - Fix the ostream logging helper to return an ostream instead of just
    returning whatever the last expression was.
This commit is contained in:
June Tate-Gans 2021-04-25 00:37:26 -05:00
parent b490dd9fff
commit 4f02eceeb1
2 changed files with 4 additions and 1 deletions

View File

@ -747,7 +747,7 @@ int G13_Manager::run() {
return 1; return 1;
} }
libusb_set_debug(ctx, 3); libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, 3);
cnt = libusb_get_device_list(ctx, &devs); cnt = libusb_get_device_list(ctx, &devs);
if (cnt < 0) { if (cnt < 0) {
G13_LOG( error, "Error while getting device list" ); G13_LOG( error, "Error while getting device list" );
@ -788,6 +788,8 @@ int G13_Manager::run() {
} }
} while (running); } while (running);
cleanup(); cleanup();
return 0;
} }
} // namespace G13 } // namespace G13

View File

@ -178,6 +178,7 @@ STREAM_T &operator <<( STREAM_T &o, const _map_keys_out<MAP_T> &_mko ) {
o << _mko.sep << i->first; o << _mko.sep << i->first;
} }
} }
return o;
}; };
template <class MAP_T> template <class MAP_T>