mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
auto/run_test: fix Wsign-compare warning
Compiling a source base / test with Wsign-compare enabled, gives
the following warning:
build/test/runners/test_system_runner.c: In function ‘run_test’:
build/test/runners/test_system_runner.c:62:35: warning: conversion to ‘UNITY_UINT’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
62 | Unity.CurrentTestLineNumber = line_num;
| ^~~~~~~~
Fix by updating the type in the function declaration.
Signed-off-by: André Draszik <git@andred.net>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*=======Test Runner Used To Run Each Test=====*/
|
||||
static void run_test(UnityTestFunction func, const char* name, int line_num)
|
||||
static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num)
|
||||
{
|
||||
Unity.CurrentTestName = name;
|
||||
Unity.CurrentTestLineNumber = line_num;
|
||||
|
||||
Reference in New Issue
Block a user