Commit graph

15 commits

Author SHA1 Message Date
Martin Braun
ef13bc8c12 uhd: Fix warnings about unused variables
There were a bunch of warnings about unused variables in UHD which were
handled in different manners:

- usrprio_rpc_common.hpp: Here a superfluous if statement was used to
  avoid the "unused" warning. However, recent compilers can also detect
  the superfluous if statement, so unused variable is now simply left
  undeclared.
- radio_control_impl.cpp had an unused constant which is now removed,
  and a conditionally used capture value which is now made "used" even
  when TRACE-level logging is disabled.
- Responder.cpp had an unused variable which was required to be
  specified as an output argument for a C-style function, so we declare
  it unused to silence the warnings.
2024-10-29 17:59:42 +01:00
Martin Braun
ebd5dd03cf Apply clang-formatting to all C/C++ files
- Used clang-format version 14
- Ran ./tools/clang-formatter.sh apply
2023-08-07 15:35:56 -05:00
A. Maitland Bottoms
f665c585ee responder: Fix printw function arguments
This is necessary when compiling with -Werror=format-security as Debian
package builds do.

Thanks to mait for the fix!
2021-10-22 06:35:44 -07:00
Martin Braun
107a49c0c2 host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree
using:

$ find . -name "*.cpp" | sort -u | xargs \
    --max-procs 8 --max-args 1 clang-tidy --format-style=file \
    --fix -p /path/to/compile_commands.json
2021-03-04 08:07:26 -06:00
Martin Braun
3b2f712ff9 utils/C API: Fix property tree access
The introduction of multi_usrp_rfnoc caused
multi_usrp::get_device()->get_tree() to segfault for gen3 devices.
In defcb174, we introduced a fix for this (multi_usrp::get_tree()) but
we didn't apply it to internal utilities.
That means the uhd_cal_* utilties were broken, along with certain
sections of the C API, and the latency test suite. This fixes the
segfault issue.
2020-03-12 07:35:15 -05:00
Brent Stapleton
967be2a4e8 uhd: mpm: apply clang-format to all files
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
```

Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
```

Formatting style was designated by the .clang-format file.
2019-01-16 11:40:23 -08:00
Michael Dickens
8651511082 responder: Better "abs()" compiler compatibility
Use "std::abs" instead of "abs" for better compiler compatibility
2018-12-12 19:23:21 -08:00
Martin Braun
053cd3fea7 docs: Purged stray references to register_handler
This is a no-longer-supported API call from before the logging API
restructuring.
2018-03-19 13:28:22 -07:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Andrej Rode
c33928d2bb utils: add set_thread_name API call, move thread_priority to thread 2017-06-29 13:43:05 -07:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Martin Braun
4047400063 utils: Backported latency bugfix from master 2014-11-26 20:49:40 +01:00
Martin Braun
6bb5e64775 utils: Removed compiler warning in latency test 2014-10-15 09:46:03 +02:00
Balint Seeber
15740bcc3b utils: Added latency measurement utility 2014-10-09 10:50:37 +02:00