Additions to windows.cfg. Fix compiler warning in test/cfg/posix.c

This commit is contained in:
Alexander Mai 2015-03-08 15:21:50 +01:00
parent 39633ef26f
commit 34a61e0883
2 changed files with 38 additions and 2 deletions

View File

@ -1461,10 +1461,45 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!--
HFONT CreateFont(
_In_ int nHeight,
_In_ int nWidth,
_In_ int nEscapement,
_In_ int nOrientation,
_In_ int fnWeight,
_In_ DWORD fdwItalic,
_In_ DWORD fdwUnderline,
_In_ DWORD fdwStrikeOut,
_In_ DWORD fdwCharSet,
_In_ DWORD fdwOutputPrecision,
_In_ DWORD fdwClipPrecision,
_In_ DWORD fdwQuality,
_In_ DWORD fdwPitchAndFamily,
_In_ LPCTSTR lpszFace
);
-->
<function name="CreateFont">
<noreturn>false</noreturn>
<arg nr="-1">
<not-uninit/>
</arg>
<arg nr="14"/>
</function>
<podtype name="LARGE_INTEGER" sign="s" size="8"/> <podtype name="LARGE_INTEGER" sign="s" size="8"/>
<podtype name="POINTER_SIGNED" sign="s"/> <podtype name="POINTER_SIGNED" sign="s"/>
<podtype name="POINTER_UNSIGNED" sign="u"/> <podtype name="POINTER_UNSIGNED" sign="u"/>
<podtype name="ULARGE_INTEGER" sign="u" size="8"/> <podtype name="ULARGE_INTEGER" sign="u" size="8"/>
<define name="INVALID_HANDLE_VALUE" value="0"/> <define name="INVALID_HANDLE_VALUE" value="0"/>
<define name="afx_msg" value=""/> <define name="afx_msg" value=""/>
<function name="CaptureStackBackTrace">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="4"/>
</function>
</def> </def>

View File

@ -7,6 +7,7 @@
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0 // No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
// //
#include <stdlib.h>
#include <stdio.h> // <- FILE #include <stdio.h> // <- FILE
#include <dirent.h> #include <dirent.h>
#include <sys/mman.h> #include <sys/mman.h>
@ -126,6 +127,8 @@ void invalidFunctionArg() {
void uninitvar(int fd) { void uninitvar(int fd) {
int x; int x;
char buf[2]; char buf[2];
int decimal, sign;
double d;
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
write(x,"ab",2); write(x,"ab",2);
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
@ -143,8 +146,6 @@ void uninitvar(int fd) {
pattern=""; pattern="";
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
regcomp(&reg, pattern, cflags); regcomp(&reg, pattern, cflags);
int decimal, sign;
double d;
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
// cppcheck-suppress unreadVariable // cppcheck-suppress unreadVariable
char *buffer = ecvt(d, 11, &decimal, &sign); char *buffer = ecvt(d, 11, &decimal, &sign);