Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Clang tidy fixes #26

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f344cb4
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-deprecate…
jtxa Nov 4, 2022
fb1d2f6
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-loop-conv…
jtxa Nov 4, 2022
972be9d
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-make-shar…
jtxa Nov 4, 2022
9b16abe
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-pass-by-v…
jtxa Nov 4, 2022
750cd87
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-raw-strin…
jtxa Nov 4, 2022
9512632
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-redundant…
jtxa Nov 4, 2022
336f952
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-return-br…
jtxa Nov 4, 2022
349e58e
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-auto'…
jtxa Nov 4, 2022
179ecda
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-bool-…
jtxa Nov 4, 2022
31eb1ab
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-defau…
jtxa Nov 4, 2022
401ba08
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-empla…
jtxa Nov 4, 2022
28fc767
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-equal…
jtxa Nov 4, 2022
e32564a
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-equal…
jtxa Nov 4, 2022
4fb9385
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-nullp…
jtxa Nov 4, 2022
3dfd4a8
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-overr…
jtxa Nov 4, 2022
d8e85e1
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-trail…
jtxa Nov 4, 2022
d24047e
run-clang-tidy-14 -header-filter='.*' -checks='-*,modernize-use-using…
jtxa Nov 4, 2022
c779dfe
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-braces-…
jtxa Nov 4, 2022
00d8402
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-contain…
jtxa Nov 4, 2022
2bcce15
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-convert…
jtxa Nov 4, 2022
ad21807
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-delete-…
jtxa Nov 4, 2022
a357987
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-duplica…
jtxa Nov 4, 2022
e191cfc
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-else-af…
jtxa Nov 4, 2022
0d6d563
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-implici…
jtxa Nov 4, 2022
4b9ff66
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-inconsi…
jtxa Nov 4, 2022
c1446da
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-isolate…
jtxa Nov 4, 2022
064d0a7
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-make-me…
jtxa Nov 4, 2022
5097c14
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-non-con…
jtxa Nov 4, 2022
d210633
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-qualifi…
jtxa Nov 4, 2022
22c4976
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-redunda…
jtxa Nov 4, 2022
316863f
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-redunda…
jtxa Nov 4, 2022
af05228
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-redunda…
jtxa Nov 4, 2022
86cbbeb
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-static-…
jtxa Nov 4, 2022
f5e2b87
run-clang-tidy-14 -header-filter='.*' -checks='-*,readability-upperca…
jtxa Nov 4, 2022
aa0b538
run-clang-tidy-14 -header-filter='.*' -checks='-*,bugprone-implicit-w…
jtxa Nov 4, 2022
8822210
run-clang-tidy-14 -header-filter='.*' -checks='-*,bugprone-macro-pare…
jtxa Nov 4, 2022
e4eb0d1
run-clang-tidy-14 -header-filter='.*' -checks='-*,cppcoreguidelines-i…
jtxa Nov 5, 2022
98055fc
run-clang-tidy-14 -header-filter='.*' -checks='-*,cppcoreguidelines-p…
jtxa Nov 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion srecord/input/file/ti_tagged_16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//

#include <cctype>
#include <cstddef>

#include <srecord/arglex/tool.h>
#include <srecord/input/file/ti_tagged_16.h>
Expand Down Expand Up @@ -129,7 +130,7 @@ srecord::input_file_ti_tagged_16::read(record &result) -> bool

case '9':
// load address which represents a word location.
address = get_word_be() * 2;
address = static_cast<unsigned long>(get_word_be() * )2;
break;

case 'B':
Expand Down
3 changes: 2 additions & 1 deletion srecord/output/file/aomf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// <http://www.gnu.org/licenses/>.
//

#include <cstddef>
#include <cstring>

#include <srecord/output/file/aomf.h>
Expand Down Expand Up @@ -85,7 +86,7 @@ void
srecord::output_file_aomf::content_record(unsigned long address,
const unsigned char *data, size_t len)
{
size_t maxlen = 4 * srecord::record::max_data_length;
size_t maxlen = static_cast<size_t>(4 * srecord::record::)max_data_length;
sierrafoxtrot marked this conversation as resolved.
Show resolved Hide resolved
while (len > 0)
{
unsigned char buffer[maxlen + 3];
Expand Down
7 changes: 4 additions & 3 deletions srecord/output/file/hexdump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// <http://www.gnu.org/licenses/>.
//

#include <cstddef>
#include <cstring>

#include <srecord/output/file/hexdump.h>
Expand Down Expand Up @@ -97,7 +98,7 @@ hex_byte(char *buffer, int n)
static void
hex(char *buffer, long value, int nbytes)
{
buffer += nbytes * 2;
buffer += static_cast<ptrdiff_t>(nbytes * )2;
while (nbytes > 0)
{
buffer -= 2;
Expand All @@ -124,11 +125,11 @@ srecord::output_file_hexdump::emit_byte(unsigned long address,
{
row_cache_address = address & ~row_cache_address_mask;
hex(row_cache, row_cache_address, address_length);
row_cache[address_length * 2] = ':';
row_cache[static_cast<ptrdiff_t>(address_length * )2] = ':';
row_cache[address_length * 2 + 3 + 3 * number_of_columns] = '#';
}
address &= row_cache_address_mask;
hex_byte(row_cache + address_length * 2 + 2 + 3 * address, data);
hex_byte(row_cache + static_cast<ptrdiff_t>(address_length * )2 + 2 + 3 * address, data);
data &= 0x7F;
if (data < ' ' || data > '~') {
data = '.';
Expand Down