Compiling yields warnings
lczech opened this issue · 0 comments
lczech commented
Hi there,
when compiling with -Wunused-parameter
, I get the following warning:
/path/to/ipk/ipk/src/ar.cpp:718:53: warning: unused parameter ‘model’ [-Wunused-parameter]
718 | std::string get_model_type(const ar::model& model)
which is located here, and seems like something is off, as this always seems to assume DNA independently of the model. Might not be a thing, but still, having such warnings in the code should be fixed :-)
Furthermore, I get the following warning:
In file included from /usr/include/string.h:495,
from /usr/include/c++/10/cstring:42,
from /usr/include/c++/10/regex:53,
from /path/to/ipk/ipk/src/ar.cpp:6:
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘void io::error::with_file_name::set_file_name(const char*)’ at /path/to/ipk/strasser/csv-parser/include/csv-parser/csv.h:78:48,
inlined from ‘char* io::LineReader::next_line()’ at /path/to/ipk/strasser/csv-parser/include/csv-parser/csv.h:472:50,
inlined from ‘void io::CSVReader<column_count, trim_policy, quote_policy, overflow_policy, comment_policy>::read_header(io::ignore_column, ColNames ...) [with ColNames = {const char*, const char*, const char*, const char*, const char*}; unsigned int column_count = 5; trim_policy = io::trim_chars<' '>; quote_policy = io::no_quote_escape<'\011'>; overflow_policy = io::throw_on_overflow; comment_policy = io::single_and_empty_line_comment<'.'>]’ at /path/to/ipk/strasser/csv-parser/include/csv-parser/csv.h:1157:60,
inlined from ‘ipk::proba_matrix ipk::ar::raxmlng_reader::read_matrix()’ at /path/to/ipk/ipk/src/ar.cpp:194:24:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
However, the function in question __builtin___strncpy_chk
is some STL-internal function, and I am not entirely sure where this is invoked, but it might still be relevant to investigate. This is with GNU 10.3.0 on Ubuntu 20.04.6 LTS.
Cheers and so long
Lucas