torognes / swarm

A robust and fast clustering method for amplicon-based studies
GNU Affero General Public License v3.0
121 stars 23 forks source link

swarm 3.0: cppcheck report (low priority) #149

Closed frederic-mahe closed 4 years ago

frederic-mahe commented 4 years ago

Adrian Zap (softwipe) kindly provided cppcheck's report for swarm 3.0. Maybe the errors should be investigated?

[search16.cc:668] -> [search16.cc:339]: (error) Array index out of bounds; buffer 'Sm' is accessed at offset 0.
[search16.cc:800] -> [search16.cc:416]: (error) Array index out of bounds; buffer 'Sm' is accessed at offset 0.
[search8.cc:907] -> [search8.cc:576]: (error) Array index out of bounds; buffer 'Sm' is accessed at offset 0.
[search8.cc:1036] -> [search8.cc:653]: (error) Array index out of bounds; buffer 'Sm' is accessed at offset 0.

[city.cc:567]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?

[city.cc:470]: (information) Skipping configuration 'HAVE_BUILTIN_EXPECT;LIKELY' since the value of 'LIKELY' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
[city.cc:470]: (information) Skipping configuration 'LIKELY' since the value of 'LIKELY' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.

[algod1.cc:572]: (style) Variable 'hits_count' is assigned a value that is never used.
[city.cc:567]: (style) Variable 's' is assigned a value that is never used.
[search16.cc:314]: (style) Variable 'h4' is assigned a value that is never used.
[search16.cc:377]: (style) Variable 'h4' is assigned a value that is never used.
[search8.cc:551]: (style) Variable 'h4' is assigned a value that is never used.
[search8.cc:614]: (style) Variable 'h4' is assigned a value that is never used.
[city.cc:175]: (style) The function 'CityHash32' is never used.
[city.cc:392]: (style) The function 'CityHash64WithSeed' is never used.
[city.cc:624]: (style) The function 'CityHashCrc128' is never used.
[city.cc:611]: (style) The function 'CityHashCrc128WithSeed' is never used.
torognes commented 4 years ago

I've fixed these issues now:

I cannot understand the problem with the other issues in search8.cc and search16.cc. I do not want to modify city.cc more.

frederic-mahe commented 4 years ago

ok, I don't have more info on the "errors", so I'll close that issue.