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

[debian-devel:14518] Re: parse error Xmu/Editres.h



On Wed, 22 Aug 2001 09:39:15 +0900
Atsuhito Kohda <kohda@xxxxxxxxxxxxxxxxxxxx> wrote:

>ここは通ったのですが PowerPC では
> 
> menu.o: In function `CreateMenu':
> menu.o(.text+0x114): undefined reference to `__va_arg_type_violation'
> menu.o(.text+0x114): relocation truncated to fit: R_PPC_REL24 __va_arg_type_violation
> collect2: ld returned 1 exit status

stdarg.h には
/* Note that the type used in va_arg is supposed to match the
   actual type **after default promotions**.
   Thus, va_arg (..., short) is not valid.  */
と書かれているので、char ではなく int にするというのでどうでしょう。

--- menu.c.old  Wed Aug 22 19:48:11 2001
+++ menu.c      Wed Aug 22 19:48:36 2001
@@ -84,3 +84,3 @@
        while ( nameChoice != NULL ) {
-               menu_type = va_arg(ap,char);            /* Get 'M' or 'T' */
+               menu_type = va_arg(ap,int);             /* Get 'M' or 'T' */
                callback = va_arg(ap,XtCallbackProc);   /* Get callback address or NULL ptr */
--
南 宏和 <minami@xxxxxxxxxxxxxxxxxxxx>