Library configuration validation: Enhance relaxng file, fix *.cfg files. (#1685)

This fixes https://trac.cppcheck.net/ticket/8985 at least for the
function configuration.
Errors in configuration files found by the new relaxng file are fixed.
This commit is contained in:
Sebastian 2019-02-22 15:31:52 +01:00 committed by GitHub
parent 71018d6d17
commit 6a3e1eeef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 11 deletions

View File

@ -69,13 +69,26 @@
<ref name="DATA-EXTNAME"/>
</attribute>
<zeroOrMore>
<choice>
<interleave>
<optional>
<element name="noreturn"><ref name="DATA-BOOL"/></element>
</optional>
<optional>
<element name="pure"><empty/></element>
</optional>
<optional>
<element name="const"><empty/></element>
</optional>
<optional>
<element name="ignorefunction"><ref name="DATA-BOOL"/></element>
</optional>
<optional>
<element name="leak-ignore"><empty/></element>
</optional>
<optional>
<element name="use-retval"><empty/></element>
</optional>
<optional>
<element name="returnValue">
<optional>
<attribute name="type">
@ -91,7 +104,8 @@
</optional>
<text/>
</element>
<element name="use-retval"><empty/></element>
</optional>
<optional>
<element name="formatstr">
<optional>
<attribute name="scan"><ref name="DATA-BOOL"/></attribute>
@ -101,6 +115,8 @@
</optional>
<empty/>
</element>
</optional>
<optional>
<element name="warn">
<attribute name="severity">
<choice>
@ -132,6 +148,8 @@
</optional>
<text/>
</element>
</optional>
<zeroOrMore>
<element name="arg">
<attribute name="nr">
<choice>
@ -190,8 +208,8 @@
</choice>
</zeroOrMore>
</element>
</choice>
</zeroOrMore>
</zeroOrMore>
</interleave>
</element>
<element name="markup">

View File

@ -146,7 +146,6 @@
<noreturn>false</noreturn>
<use-retval/>
<returnValue type="Display *"/>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>

View File

@ -3650,9 +3650,8 @@ HFONT CreateFont(
<use-retval/>
<pure/>
<noreturn>false</noreturn>
<returnValue type="size_t"/>
<leak-ignore/>
<returnValue>strlen(arg1)</returnValue>
<returnValue type="size_t">strlen(arg1)</returnValue>
<arg nr="1">
<not-null/>
<not-uninit/>
@ -3666,11 +3665,10 @@ HFONT CreateFont(
<!-- size_t _mbstrlen( const char *str ); -->
<function name="_mbslen,_mbstrlen,_tcslen,_tcsclen">
<use-retval/>
<returnValue type="size_t"/>
<pure/>
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue>strlen(arg1)</returnValue>
<returnValue type="size_t">strlen(arg1)</returnValue>
<arg nr="1">
<not-null/>
<not-uninit/>

View File

@ -7521,7 +7521,6 @@
<arg nr="1">
<not-uninit/>
</arg>
<use-retval/>
<arg nr="2">
<not-uninit/>
</arg>