mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
fix all ql/use-string-compare
This commit is contained in:
@@ -13,7 +13,7 @@ import cpp
|
||||
|
||||
from Function f
|
||||
where
|
||||
f.getName().regexpMatch("atof|atoi|atol") and
|
||||
f.getName() = ["atof", "atoi", "atol"] and
|
||||
f.getFile().getAbsolutePath().matches("%stdlib.h")
|
||||
select f.getACallToThisFunction(),
|
||||
"AV Rule 23: The library functions atof, atoi and atol from library <stdlib.h> shall not be used."
|
||||
|
||||
@@ -13,7 +13,7 @@ import cpp
|
||||
|
||||
from Function f
|
||||
where
|
||||
f.getName().regexpMatch("abort|exit|getenv|system") and
|
||||
f.getName() = ["abort", "exit", "getenv", "system"] and
|
||||
f.getFile().getAbsolutePath().matches("%stdlib.h")
|
||||
select f.getACallToThisFunction(),
|
||||
"The library functions abort, exit, getenv and system from library <stdlib.h> should not be used."
|
||||
|
||||
Reference in New Issue
Block a user