mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
benchmarks/cyclictest: fix comp. warning and optargs termination
Fix reqtimeout_timer may be uninitilized. Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
This commit is contained in:
parent
df711238fe
commit
9968fa064b
1 changed files with 3 additions and 2 deletions
|
|
@ -148,6 +148,7 @@ static const struct option optargs[] =
|
|||
{"threads", optional_argument, 0, 't'},
|
||||
{"timer-device", optional_argument, 0, 'T'},
|
||||
{"policy", optional_argument, 0, 'y'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -525,7 +526,7 @@ static void *testthread(void *arg)
|
|||
|
||||
while (running)
|
||||
{
|
||||
/* This inicializes the stamp1.timeout field */
|
||||
/* This initializes the stamp1.timeout field */
|
||||
|
||||
if (config.meas_method == M_TIMER_API)
|
||||
{
|
||||
|
|
@ -925,7 +926,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
reqtimeout_timer = config.interval;
|
||||
}
|
||||
else if (config.wait_method == W_NANOSLEEP)
|
||||
else
|
||||
{
|
||||
/* Multiply by 3 instead of 2, just to be sure */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue