mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-14 19:08:19 +08: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:

committed by
Mateusz Szafoni

parent
df711238fe
commit
9968fa064b
@@ -148,6 +148,7 @@ static const struct option optargs[] =
|
|||||||
{"threads", optional_argument, 0, 't'},
|
{"threads", optional_argument, 0, 't'},
|
||||||
{"timer-device", optional_argument, 0, 'T'},
|
{"timer-device", optional_argument, 0, 'T'},
|
||||||
{"policy", optional_argument, 0, 'y'},
|
{"policy", optional_argument, 0, 'y'},
|
||||||
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -525,7 +526,7 @@ static void *testthread(void *arg)
|
|||||||
|
|
||||||
while (running)
|
while (running)
|
||||||
{
|
{
|
||||||
/* This inicializes the stamp1.timeout field */
|
/* This initializes the stamp1.timeout field */
|
||||||
|
|
||||||
if (config.meas_method == M_TIMER_API)
|
if (config.meas_method == M_TIMER_API)
|
||||||
{
|
{
|
||||||
@@ -925,7 +926,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
reqtimeout_timer = config.interval;
|
reqtimeout_timer = config.interval;
|
||||||
}
|
}
|
||||||
else if (config.wait_method == W_NANOSLEEP)
|
else
|
||||||
{
|
{
|
||||||
/* Multiply by 3 instead of 2, just to be sure */
|
/* Multiply by 3 instead of 2, just to be sure */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user