super1.c:1146: warning: 'offset' might be used uninitialized in this function

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

 



Hello,

I'm unable to compile mdadm-2.6 with gcc-3.4.6 and
make all mdadm.static CXFLAGS="-s -Os":

super1.c: In function `add_internal_bitmap1':
super1.c:1146: warning: 'offset' might be used uninitialized in this function
make: *** [super1.o] Error 1

How about attached patch?

diff -Nur mdadm-2.6-orig/super1.c mdadm-2.6/super1.c
--- mdadm-2.6-orig/super1.c	2006-12-14 07:33:13.000000000 +0100
+++ mdadm-2.6/super1.c	2007-02-13 02:37:01.000000000 +0100
@@ -1203,6 +1203,9 @@
 			}
 		}
 		break;
+
+	default:
+		return 0;
 	}

 	if (chunk == UnSet && room > 128*2)

Best regards,

				Krzysztof Olędzki
diff -Nur mdadm-2.6-orig/super1.c mdadm-2.6/super1.c
--- mdadm-2.6-orig/super1.c	2006-12-14 07:33:13.000000000 +0100
+++ mdadm-2.6/super1.c	2007-02-13 02:37:01.000000000 +0100
@@ -1203,6 +1203,9 @@
 			}
 		}
 		break;
+
+	default:
+		return 0;
 	}
 
 	if (chunk == UnSet && room > 128*2)

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux