Skip to content

Commit

Permalink
Fix argument direction in windows.cfg, missing Qt macros (danmar#5302)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Aug 8, 2023
1 parent c3d7c91 commit 5ea1bca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions cfg/qt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5097,6 +5097,9 @@
<define name="QT_TRANSLATE_NOOP_UTF8(scope, x)" value="x"/>
<define name="QT_TRANSLATE_NOOP3(scope, x, comment)" value="{x, comment}"/>
<define name="QT_TRANSLATE_NOOP3_UTF8(scope, x, comment)" value="{x, comment}"/>
<define name="QT_WARNING_PUSH" value=""/>
<define name="QT_WARNING_POP" value=""/>
<define name="QT_STRINGIFY(x)" value="#x"/>
<define name="QCOMPARE(actual, expected)" value="(void)((actual)==(expected))"/>
<define name="QVERIFY(condition)" value="(void)(condition)"/>
<define name="QVERIFY2(condition, message)" value="(void)(condition),(void)(message)"/>
Expand Down
18 changes: 9 additions & 9 deletions cfg/windows.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,7 @@ HFONT CreateFont(
<arg nr="1" direction="out">
<not-null/>
</arg>
<arg nr="2" direction="in">
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3" direction="in">
Expand All @@ -2985,7 +2985,7 @@ HFONT CreateFont(
<arg nr="1" direction="out">
<not-null/>
</arg>
<arg nr="2" direction="in">
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3" direction="in">
Expand Down Expand Up @@ -3023,7 +3023,7 @@ HFONT CreateFont(
_In_ LPARAM lParam); -->
<function name="SendMessage,SendMessageA,SendMessageW">
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
Expand All @@ -3044,7 +3044,7 @@ HFONT CreateFont(
_In_ LPARAM lParam); -->
<function name="PostMessage,PostMessageA,PostMessageW">
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" direction="in">
Expand Down Expand Up @@ -3306,7 +3306,7 @@ HFONT CreateFont(
<noreturn>false</noreturn>
<returnValue type="LPVOID"/>
<leak-ignore/>
<arg nr="1" direction="in">
<arg nr="1">
<not-null/>
</arg>
</function>
Expand All @@ -3315,10 +3315,10 @@ HFONT CreateFont(
<noreturn>false</noreturn>
<returnValue type="HGLOBAL"/>
<leak-ignore/>
<arg nr="1" direction="in">
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<arg nr="2">
<not-uninit/>
</arg>
</function>
Expand All @@ -3327,7 +3327,7 @@ HFONT CreateFont(
<noreturn>false</noreturn>
<returnValue type="BOOL"/>
<leak-ignore/>
<arg nr="1" direction="in">
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
Expand All @@ -3339,7 +3339,7 @@ HFONT CreateFont(
<noreturn>false</noreturn>
<returnValue type="BOOL"/>
<leak-ignore/>
<arg nr="1" direction="in">
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
Expand Down
4 changes: 4 additions & 0 deletions test/cfg/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,4 +1113,8 @@ void invalidPrintfArgType_StructMember(double d) { // #9672
my_struct_t my_struct;
// cppcheck-suppress invalidPrintfArgType_sint
my_struct.st.Format("%d", d);
}

BOOL MyEnableWindow(HWND hWnd, BOOL bEnable) {
return EnableWindow(hWnd, bEnable);
}

0 comments on commit 5ea1bca

Please sign in to comment.