Astyle run; Extended std.cfg and avr.cfg about a few more functions.

This commit is contained in:
orbitcowboy 2014-06-23 11:59:14 +02:00
parent ae81b09b58
commit f57e875351
3 changed files with 65 additions and 13 deletions

View File

@ -120,13 +120,54 @@
<!-- stdio.h -->
<define name="fdev_set_udata(stream, u)" value="do { (stream)- > udata = u; } while(0)"/>
<define name="fdev_get_udata(stream)" value="((stream)- > udata)"/>
<define name="fdev_setup_stream" value="(stream, put, get, rwflag)" />
<define name="_FDEV_SETUP_READ" value="__SRD"/>
<define name="_FDEV_SETUP_WRITE" value="__SWR"/>
<define name="_FDEV_SETUP_RW" value="(__SRD | __SWR)"/>
<define name="_FDEV_ERR" value="(-1)"/>
<define name="_FDEV_EOF" value="(-2)"/>
<define name="FDEV_SETUP_STREAM" value="(put, get, rwflag)" />
<define name="putc(__c, __stream)" value="fputc(__c, __stream)"/>
<define name="putchar(__c)" value="fputc(__c, stdout)"/>
<define name="getc(__stream)" value="fgetc(__stream)"/>
<define name="getchar()" value="fgetc(stdin)"/>
<define name="getchar()" value="fgetc(stdin)"/>
<define name="SEEK_SET" value="0"/>
<define name="SEEK_CUR" value="1"/>
<define name="SEEK_END" value="2"/>
<function name="vfprintf_P">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1"><not-null/><not-uninit/></arg><formatstr/>
<arg nr="2"><formatstr/></arg>
<arg nr="any"><not-uninit/></arg>
</function>
<function name="printf_P">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/> <arg nr="1"><formatstr/></arg>
<arg nr="any"><not-uninit/></arg>
</function>
<function name="sprintf_P">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/> <arg nr="2"><formatstr/></arg>
</function>
<function name="snprintf_P">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/> <arg nr="3"><formatstr/></arg>
</function>
<function name="vsprintf_P">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/> <arg nr="2"><formatstr/></arg>
</function>
<function name="vsnprintf_P">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/> <arg nr="3"><formatstr/></arg>
</function>
<!-- stdlib.h -->
<define name="__ptr_t" value="void *"/>
<define name="RAND_MAX" value="0x7FFF"/>
</def>

View File

@ -38,7 +38,8 @@
<function name="floor"><noreturn>false</noreturn><leak-ignore/><arg nr="1"><not-null/><not-uninit/></arg></function>
<function name="fmod"><noreturn>false</noreturn><leak-ignore/><arg nr="1"><not-null/><not-uninit/></arg><arg nr="2"><not-null/><not-uninit/></arg></function>
<function name="fopen"><noreturn>false</noreturn><arg nr="1"><not-null/><not-uninit/></arg><arg nr="2"><not-null/><not-uninit/></arg></function>
<function name="fprintf"><noreturn>false</noreturn><leak-ignore/><arg nr="1"><not-null/><not-uninit/></arg><formatstr/><arg nr="2"><formatstr/></arg></function>
<function name="fprintf"><noreturn>false</noreturn><leak-ignore/><arg nr="1"><not-null/><not-uninit/></arg><formatstr/><arg nr="2"><formatstr/></arg><arg nr="any"><not-uninit/></arg></function>
<function name="vfprintf"><noreturn>false</noreturn><leak-ignore/><arg nr="1"><not-null/><not-uninit/></arg><formatstr/><arg nr="2"><formatstr/></arg><arg nr="any"><not-uninit/></arg></function>
<function name="fputc">
<noreturn>false</noreturn>
<leak-ignore/>
@ -202,7 +203,15 @@
</function>
<function name="printf">
<noreturn>false</noreturn>
<formatstr/> <arg nr="1"><formatstr/></arg> <arg nr="any"><not-uninit/></arg>
<leak-ignore/>
<formatstr/> <arg nr="1"><formatstr/></arg>
<arg nr="any"><not-uninit/></arg>
</function>
<function name="vprintf">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/> <arg nr="1"><formatstr/></arg>
<arg nr="any"><not-uninit/></arg>
</function>
<function name="putc">
<noreturn>false</noreturn>
@ -282,17 +291,19 @@
<function name="wcstoull"> <leak-ignore/> <arg nr="3"><valid>0,2:36</valid></arg> </function>
<function name="wprintf"> <noreturn>false</noreturn> <formatstr/> <arg nr="1"><formatstr/></arg> </function>
<function name="sprintf"> <noreturn>false</noreturn> <formatstr/> <arg nr="2"><formatstr/></arg> </function>
<function name="fwprintf"> <noreturn>false</noreturn> <formatstr/> <arg nr="2"><formatstr/></arg> </function>
<function name="snprintf"> <noreturn>false</noreturn> <formatstr/> <arg nr="3"><formatstr/></arg> </function>
<function name="fnprintf"> <noreturn>false</noreturn> <formatstr/> <arg nr="3"><formatstr/></arg> </function>
<function name="wprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="1"><formatstr/></arg> </function>
<function name="sprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="2"><formatstr/></arg> </function>
<function name="vsprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="2"><formatstr/></arg> </function>
<function name="fwprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="2"><formatstr/></arg> </function>
<function name="snprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="3"><formatstr/></arg> </function>
<function name="vsnprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="3"><formatstr/></arg> </function>
<function name="fnprintf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr/> <arg nr="3"><formatstr/></arg> </function>
<function name="wscanf"> <noreturn>false</noreturn> <formatstr scan="true"/> <arg nr="1"><formatstr/></arg> </function>
<function name="sscanf"> <noreturn>false</noreturn> <formatstr scan="true"/> <arg nr="2"><formatstr/></arg> </function>
<function name="wscanf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr scan="true"/> <arg nr="1"><formatstr/></arg> </function>
<function name="sscanf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr scan="true"/> <arg nr="2"><formatstr/></arg> </function>
<function name="fwscanf"> <noreturn>false</noreturn> <formatstr scan="true"/> <arg nr="2"><formatstr/></arg> </function>
<function name="swscanf"> <noreturn>false</noreturn> <formatstr scan="true"/> <arg nr="2"><formatstr/></arg> </function>
<function name="fwscanf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr scan="true"/> <arg nr="2"><formatstr/></arg> </function>
<function name="swscanf"> <noreturn>false</noreturn> <leak-ignore/> <formatstr scan="true"/> <arg nr="2"><formatstr/></arg> </function>
<podtype name="int8_t" sign="s" size="1"/>
<podtype name="int16_t" sign="s" size="2"/>

View File

@ -2105,7 +2105,7 @@ private:
TODO_ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n"
"[test.cpp:4] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n"
"[test.cpp:5] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n"
"[test.cpp:6] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n",
"[test.cpp:6] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n",
"[test.cpp:3] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n"
"[test.cpp:4] -> [test.cpp:2]: (warning) Possible null pointer dereference: p - otherwise it is redundant to check it against null.\n",
errout.str());