Skip to content

Commit 4441ebd

Browse files
authored
posix.cfg: Improved support for nice(). (danmar#7135)
Reference: https://www.man7.org/linux/man-pages/man2/nice.2.html
1 parent e3696fc commit 4441ebd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

cfg/posix.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,6 +1942,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
19421942
<arg nr="1">
19431943
<not-uninit/>
19441944
<not-bool/>
1945+
<valid>-20:19</valid>
19451946
</arg>
19461947
</function>
19471948
<!-- int pause(void); -->

test/cfg/posix.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,3 +1496,13 @@ void ctime_r_test(const time_t * timep, char * bufSizeUnknown)
14961496
// cppcheck-suppress ctime_rCalled
14971497
ctime_r(timep, bufSizeUnknown);
14981498
}
1499+
1500+
void invalidFunctionArg_nice(int inc)
1501+
{
1502+
// cppcheck-suppress invalidFunctionArg
1503+
nice(-21);
1504+
nice(-20);
1505+
nice(19);
1506+
// cppcheck-suppress invalidFunctionArg
1507+
nice(+20);
1508+
}

0 commit comments

Comments
 (0)