Skip to content

Commit d1ae6b4

Browse files
authored
Merge pull request drowe67#203 from drowe67/ms-warning-cleaup
Clean up warnings when using -Wall
2 parents 8b99282 + ade87e7 commit d1ae6b4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/generate_codebook.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ dump_structure(const struct codebook * b, int index)
8080
{
8181
printf(" {\n");
8282
printf(" %d,\n", b->k);
83-
printf(" %g,\n", log(b->m) / log(2));
83+
printf(" %d,\n", (int)roundf(log(b->m) / log(2)));
8484
printf(" %d,\n", b->m);
8585
printf(" codes%d\n", index);
8686
printf(" }");

unittest/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ add_library(function_trace STATIC ../unittest/function_trace.c)
4444
add_executable(ofdm_stack ofdm_stack.c ../src/ofdm.c ../src/octave.c ../src/kiss_fft.c ../src/modem_probe.c ../src/mpdecode_core.c ../src/phi0.c ../src/filter.c)
4545
if (CMAKE_C_COMPILER MATCHES "gcc$")
4646
target_link_libraries(ofdm_stack function_trace m -no-pie "-Wl,-Map=ofdm_stack.map")
47-
target_compile_options(ofdm_stack PUBLIC -fstack-usage -finstrument-functions -no-pie)
47+
target_compile_options(ofdm_stack PUBLIC -fstack-usage -finstrument-functions)
4848
else()
4949
target_link_libraries(ofdm_stack function_trace m -no-pie)
50-
target_compile_options(ofdm_stack PUBLIC -finstrument-functions -no-pie)
50+
target_compile_options(ofdm_stack PUBLIC -finstrument-functions)
5151
endif()
5252
add_definitions(-D__UNITTEST__)
5353

unittest/compare_ints.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int main(int argc, char *argv[]) {
126126
uint64_t err = llabs(data1 - data2);
127127
if (err > tol) {
128128
errors ++;
129-
printf("%d %ld %ld\n", count, data1, data2);
129+
printf("%d %lld %lld\n", count, data1, data2);
130130
if (numerrorstoexit != -1)
131131
if (errors > numerrorstoexit) {
132132
printf("reached errors: %d, bailing!", numerrorstoexit);

0 commit comments

Comments
 (0)