Coda File System

Re: Redhat 7.1 Compile Problems

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Thu, 19 Jul 2001 10:23:49 -0400
On Thu, Jul 19, 2001 at 07:12:19AM -0700, Maslanik, John R. wrote:
> vol_cml.cc: In function `int RLE_Size (ARG *, ...)':
> vol_cml.cc:3321: non-lvalue in unary `&'
...
>   Any ideas on how I get get coda to compile.

Yup, this one seems to work for me just fine.

Jan

Index: vol_cml.cc
===================================================================
RCS file: /afs/cs/project/coda-src/cvs/coda/coda-src/venus/vol_cml.cc,v
retrieving revision 4.75
retrieving revision 4.76
diff -u -u -r4.75 -r4.76
--- vol_cml.cc	2001/06/08 01:58:58	4.75
+++ vol_cml.cc	2001/07/13 17:08:42	4.76
@@ -3306,6 +3306,7 @@
 {
     int len = 0;
     ARG *a_types;
+    unsigned int arg;
     PARM *args;
 
     va_list ap;
@@ -3318,10 +3319,12 @@
 
     for	(a_types = ArgTypes; a_types->mode != C_END; a_types++)
     {
-	args = (PARM *)&va_arg(ap, unsigned long);
+	arg = va_arg(ap, unsigned int);
+	args = (PARM *)&arg;
+
 	LOG(1000, ("RLE_Size: a_types = [%d %d %d %x], args = (%x %x)\n",
 		   a_types->mode, a_types->type, a_types->size, a_types->field,
-		   args, *args));
+		   *args));
 
 	if (a_types->mode != IN_MODE && a_types->mode != IN_OUT_MODE)
 	    continue;
@@ -3347,13 +3350,15 @@
 static void RLE_Pack(PARM **ptr, ARG *ArgTypes ...)
 {
     ARG *a_types;
+    unsigned int arg;
     PARM *args;
     va_list ap;
     va_start(ap, ArgTypes);
 
     /* see comment about GNU C above. */
     for	(ARG *a_types =	ArgTypes; a_types->mode	!= C_END; a_types++) {
-	args = (PARM *)&va_arg(ap, unsigned long);
+	arg = va_arg(ap, unsigned int);
+	args = (PARM *)&arg;
 	LOG(1000, ("RLE_Pack: a_types = [%d %d %d %x], ptr = (%x %x %x), args = (%x %x)\n",
 		   a_types->mode, a_types->type, a_types->size, a_types->field,
 		   ptr, *ptr, **ptr, args, *args));
Received on 2001-07-19 10:23:51