From dea15377357b697bddb893ce9ca2a90fc7d6cf4d Mon Sep 17 00:00:00 2001 From: Robert Izzard <r.izzard@surrey.ac.uk> Date: Wed, 11 Dec 2019 17:40:18 +0000 Subject: [PATCH] fix issue with return type of strerror_r being dependent on GNU or XSI compliance: now we just ignore it (we only really want the errstring anyway) --- src/setup/cmd_line_function_macros.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/setup/cmd_line_function_macros.h b/src/setup/cmd_line_function_macros.h index d363be96e..e3ad53a4f 100644 --- a/src/setup/cmd_line_function_macros.h +++ b/src/setup/cmd_line_function_macros.h @@ -24,17 +24,16 @@ if(errno) \ { \ char errstring[100]; \ - char * x = strerror_r(errnum,errstring,100); \ + strerror_r(errnum,errstring,100); \ Exit_binary_c( \ BINARY_C_UNDER_OR_OVERFLOW, \ - "Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s %s)\n", \ + "Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s)\n", \ c, \ argv[c], \ argv[c-1], \ ((test<0.0)?"under":"over"), \ errnum, \ - errstring, \ - x); \ + errstring); \ } \ *((double*) a->pointer) = a->modulate * test; \ __match=TRUE; \ @@ -190,17 +189,16 @@ if(errno) \ { \ char errstring[100]; \ - char * x = strerror_r(errnum,errstring,100); \ + strerror_r(errnum,errstring,100); \ Exit_binary_c( \ BINARY_C_UNDER_OR_OVERFLOW, \ - "Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s %s)\n", \ + "Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s)\n", \ c, \ argv[c], \ argv[c-1], \ ((test<0.0)?"under":"over"), \ errnum, \ - errstring, \ - x); \ + errstring); \ } \ *((double*)cmd_line_args[i].pointer + offset) = \ (double)test; \ -- GitLab