mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-04 12:41:34 +00:00
smptests: Address -Wsign-compare warnings
Most of these warnings were between int or ssize_t and size_t. In particular, various POSIX system calls like read() and write() return ssize_t and comparing that value with the sizeof a buffer is a common source of these warnings. Another common source is using an int as the iterator in a for loop with the limit being a size_t. With the type change, some printf() specifiers needed to change also.
This commit is contained in:
@@ -50,7 +50,7 @@ rtems_task Init(
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
int i;
|
||||
uint32_t i;
|
||||
char ch;
|
||||
uint32_t cpu_num;
|
||||
rtems_id id;
|
||||
|
||||
@@ -119,7 +119,7 @@ void Validate_affinity(void )
|
||||
cpu_set_t cpuset0;
|
||||
cpu_set_t cpuset1;
|
||||
cpu_set_t cpuset2;
|
||||
uint32_t i;
|
||||
int i;
|
||||
int sc;
|
||||
int cpu_count;
|
||||
rtems_task_priority priority;
|
||||
@@ -231,7 +231,7 @@ static void Init(rtems_task_argument arg)
|
||||
{
|
||||
(void) arg;
|
||||
|
||||
int sc;
|
||||
rtems_status_code sc;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ rtems_id task_sem;
|
||||
* Spin loop to allow tasks to delay without yeilding the
|
||||
* processor.
|
||||
*/
|
||||
static void test_delay(int ticks)
|
||||
static void test_delay(rtems_interval ticks)
|
||||
{
|
||||
rtems_interval start, stop;
|
||||
start = rtems_clock_get_ticks_since_boot();
|
||||
|
||||
@@ -123,7 +123,7 @@ void Validate_affinity(void )
|
||||
cpu_set_t cpuset0;
|
||||
cpu_set_t cpuset1;
|
||||
cpu_set_t cpuset2;
|
||||
uint32_t i;
|
||||
int i;
|
||||
int sc;
|
||||
int cpu_count;
|
||||
struct sched_param param;
|
||||
|
||||
@@ -43,7 +43,7 @@ const char rtems_test_name[] = "SMPSCHEDAFFINITY 3";
|
||||
#define NUM_CPUS 4
|
||||
#define TASK_COUNT NUM_CPUS
|
||||
|
||||
static void test_delay(int ticks)
|
||||
static void test_delay(rtems_interval ticks)
|
||||
{
|
||||
rtems_interval start, stop;
|
||||
start = rtems_clock_get_ticks_since_boot();
|
||||
|
||||
@@ -58,7 +58,7 @@ rtems_id task_sem;
|
||||
|
||||
static void task(rtems_task_argument arg);
|
||||
|
||||
static void test_delay(int ticks)
|
||||
static void test_delay(rtems_interval ticks)
|
||||
{
|
||||
rtems_interval start, stop;
|
||||
start = rtems_clock_get_ticks_since_boot();
|
||||
@@ -91,8 +91,8 @@ static void test(void)
|
||||
{
|
||||
rtems_status_code sc;
|
||||
uint32_t cpu_count;
|
||||
int cpu;
|
||||
int i;
|
||||
uint32_t cpu;
|
||||
uint32_t i;
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Get the number of processors that we are using. */
|
||||
|
||||
@@ -79,7 +79,7 @@ static void verify_tasks(void);
|
||||
* Spin loop to allow tasks to delay without yeilding the
|
||||
* processor.
|
||||
*/
|
||||
static void test_delay(int ticks)
|
||||
static void test_delay(rtems_interval ticks)
|
||||
{
|
||||
rtems_interval start, stop;
|
||||
start = rtems_clock_get_ticks_since_boot();
|
||||
|
||||
Reference in New Issue
Block a user