freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freeipmi-devel] va_list comparison


From: Ales Ledvinka
Subject: [Freeipmi-devel] va_list comparison
Date: Thu, 30 May 2013 12:41:30 -0400 (EDT)

Hello,

On architectures the va_list related code fails to build with message:
"error: wrong type argument to unary exclamation mark"
at the "if (!ap)" line of the following change
http://svn.savannah.gnu.org/viewvc/trunk/common/toolcommon/pstdout.c?root=freeipmi&view=diff&r1=9571&r2=9572

It's the only place yet. Here is the failed build:
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1871930

(1.2.7) With the patch:
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1872167

(1.3.0.beta0 with the patch)
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1872242

The patch simply removes the check code in question. Since the standard does 
not provide check macro. 
The va_list type expands to builtin macro which seems it might be architecture 
specific. Or the processing
of va_list is. Though I don't have the arm machine with recent tools to check 
this issue.
If not dropping the check then maybe #if it out for __arm__, __aarch64__, 
__alpha__
or change to pass pointer and check the pointer as suggested in the
http://www.open-std.org/jtc1/sc22/wg14/www/docs/C99RationaleV5.10.pdf
page 142 line 10.

diff -up ./common/toolcommon/pstdout.c.vaty ./common/toolcommon/pstdout.c
--- ./common/toolcommon/pstdout.c.vaty  2013-05-30 16:04:27.461099744 +0200
+++ ./common/toolcommon/pstdout.c       2013-05-30 16:04:36.516115447 +0200
@@ -761,12 +761,12 @@ pstdout_vprintf(pstdout_state_t pstate,
       return -1;
     }

-  if (!ap)
+/*  if (!ap)
     {
       pstdout_errnum = PSTDOUT_ERR_PARAMETERS;
       return -1;
     }
-
+*/
   rv = _pstdout_print(pstate, 0, stdout, format, ap);
   return rv;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]