mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Reduce some false-positive warnings from GCC to warnings with -Werror
This also works around some of the same warnings. These are known bugs in GCC 11+ and GCC 13.x.
This commit is contained in:
parent
cd356ce45d
commit
57a3c733d1
6 changed files with 30 additions and 22 deletions
|
@ -40,8 +40,10 @@ std::string ZAMLocInfo::Describe(bool include_lines) const {
|
|||
|
||||
if ( include_lines ) {
|
||||
desc += ";" + func_name + ":" + std::to_string(loc->FirstLine());
|
||||
if ( loc->LastLine() > loc->FirstLine() )
|
||||
desc += "-" + std::to_string(loc->LastLine());
|
||||
if ( loc->LastLine() > loc->FirstLine() ) {
|
||||
desc.append("-");
|
||||
desc.append(std::to_string(loc->LastLine()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue