astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2019-05-17 09:32:14 +02:00
parent bf5c71bdca
commit e80181d35a
3 changed files with 25 additions and 25 deletions

View File

@ -1120,7 +1120,7 @@
</arg>
</function>
<!-- ########## Resource allocation ########## -->
<resource>
<resource>
<alloc init="true">mkostemp</alloc>
<alloc init="true">mkstemps</alloc>
<alloc init="true">mkostemps</alloc>

View File

@ -17,56 +17,56 @@
void resourceLeak_mkostemps(char *template, int suffixlen, int flags)
{
// cppcheck-suppress unreadVariable
int fp = mkostemps(template, suffixlen, flags);
// cppcheck-suppress resourceLeak
// cppcheck-suppress unreadVariable
int fp = mkostemps(template, suffixlen, flags);
// cppcheck-suppress resourceLeak
}
void no_resourceLeak_mkostemps_01(char *template, int suffixlen, int flags)
{
int fp = mkostemps(template, suffixlen, flags);
close(fp);
int fp = mkostemps(template, suffixlen, flags);
close(fp);
}
int no_resourceLeak_mkostemps_02(char *template, int suffixlen, int flags)
{
return mkostemps(template, suffixlen, flags);
return mkostemps(template, suffixlen, flags);
}
void resourceLeak_mkstemps(char *template, int suffixlen)
{
// cppcheck-suppress unreadVariable
int fp = mkstemps(template, suffixlen);
// cppcheck-suppress resourceLeak
// cppcheck-suppress unreadVariable
int fp = mkstemps(template, suffixlen);
// cppcheck-suppress resourceLeak
}
void no_resourceLeak_mkstemps_01(char *template, int suffixlen)
{
int fp = mkstemps(template, suffixlen);
close(fp);
int fp = mkstemps(template, suffixlen);
close(fp);
}
int no_resourceLeak_mkstemps_02(char *template, int suffixlen)
{
return mkstemps(template, suffixlen);
return mkstemps(template, suffixlen);
}
void resourceLeak_mkostemp(char *template, int flags)
{
// cppcheck-suppress unreadVariable
int fp = mkostemp(template, flags);
// cppcheck-suppress resourceLeak
// cppcheck-suppress unreadVariable
int fp = mkostemp(template, flags);
// cppcheck-suppress resourceLeak
}
void no_resourceLeak_mkostemp_01(char *template, int flags)
{
int fp = mkostemp(template, flags);
close(fp);
int fp = mkostemp(template, flags);
close(fp);
}
int no_resourceLeak_mkostemp_02(char *template, int flags)
{
return mkostemp(template, flags);
return mkostemp(template, flags);
}
void valid_code(int argInt1)

View File

@ -136,20 +136,20 @@ void resourceLeak_fdopen(int fd)
void resourceLeak_mkstemp(char *template)
{
// cppcheck-suppress unreadVariable
int fp = mkstemp(template);
// cppcheck-suppress resourceLeak
// cppcheck-suppress unreadVariable
int fp = mkstemp(template);
// cppcheck-suppress resourceLeak
}
void no_resourceLeak_mkstemp_01(char *template)
{
int fp = mkstemp(template);
close(fp);
int fp = mkstemp(template);
close(fp);
}
int no_resourceLeak_mkstemp_02(char *template)
{
return mkstemp(template);
return mkstemp(template);
}
void resourceLeak_fdopendir(int fd)