[igt-dev] [PATCH i-g-t 2/2] runner: Remove some unused values

Petri Latvala petri.latvala at intel.com
Thu Aug 11 05:13:25 UTC 2022


On Wed, Aug 10, 2022 at 03:44:53PM +0200, Ryszard Knop wrote:
> These values were immediately overwritten or left unused, remove them.
> 
> Signed-off-by: Ryszard Knop <ryszard.knop at intel.com>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>

> ---
>  runner/resultgen.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/runner/resultgen.c b/runner/resultgen.c
> index 38d90bda..479d6d4f 100644
> --- a/runner/resultgen.c
> +++ b/runner/resultgen.c
> @@ -621,7 +621,7 @@ static void process_dynamic_subtest_output(const char *piglit_name,
>  
>  	for (k = begin_idx + 1; k < result_idx; k++) {
>  		struct json_object *current_dynamic_test = NULL;
> -		int dyn_result_idx = -1;
> +		int dyn_result_idx;
>  		char dynamic_name[256];
>  		char dynamic_piglit_name[256];
>  		const char *dynbeg, *dynend;
> @@ -748,7 +748,7 @@ static bool fill_from_output(int fd, const char *binary, const char *key,
>  	matches = find_matches(buf, bufend, needles);
>  
>  	for (i = 0; i < subtests->size; i++) {
> -		int begin_idx = -1, result_idx = -1;
> +		int begin_idx, result_idx;
>  		const char *resulttext;
>  		const char *beg, *end;
>  		double time;
> @@ -975,7 +975,6 @@ static bool fill_from_dmesg(int fd,
>  	FILE *f = fdopen(fd, "r");
>  	char piglit_name[256];
>  	char dynamic_piglit_name[256];
> -	ssize_t read;
>  	size_t i;
>  	GRegex *re;
>  
> @@ -988,7 +987,7 @@ static bool fill_from_dmesg(int fd,
>  		return false;
>  	}
>  
> -	while ((read = getline(&line, &linelen, f)) > 0) {
> +	while (getline(&line, &linelen, f) > 0) {
>  		char *formatted;
>  		unsigned flags;
>  		unsigned long long ts_usec;
> -- 
> 2.37.1
> 


More information about the igt-dev mailing list