diff --git a/cfg/windows.cfg b/cfg/windows.cfg index 6bdec154e..2c0db5b23 100644 --- a/cfg/windows.cfg +++ b/cfg/windows.cfg @@ -5369,8 +5369,7 @@ HFONT CreateFont( - + @@ -5380,8 +5379,7 @@ HFONT CreateFont( 0: - + false @@ -5390,9 +5388,9 @@ HFONT CreateFont( 0: + This function is deprecated because a more secure version is available '_malloca'. - + false diff --git a/test/cfg/windows.cpp b/test/cfg/windows.cpp index 4a5d48218..5bf27cbd2 100644 --- a/test/cfg/windows.cpp +++ b/test/cfg/windows.cpp @@ -260,6 +260,7 @@ void validCode() void *pMem1 = _malloca(1); _freea(pMem1); // Memory from _alloca must not be freed + // cppcheck-suppress _allocaCalled void *pMem2 = _alloca(10); memset(pMem2, 0, 10); @@ -683,6 +684,7 @@ void ignoredReturnValue() // cppcheck-suppress leakReturnValNotUsed _malloca(10); // cppcheck-suppress ignoredReturnValue + // cppcheck-suppress _allocaCalled _alloca(5); // cppcheck-suppress ignoredReturnValue @@ -745,6 +747,7 @@ void invalidFunctionArg() _freea(pMem); // FIXME cppcheck-suppress unreadVariable // cppcheck-suppress invalidFunctionArg + // cppcheck-suppress _allocaCalled pMem = _alloca(-5); }