[PATCH] compile sparse with Intel C

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

 



Hi

This patch makes sparse compile with Intel C compiler.

Intel C complains that it cannot initialize flexible arrays (defined at 
the end of the structure with []).

Mikulas

--- dissect.h_	2012-06-20 01:31:19.000000000 +0200
+++ dissect.h	2012-06-20 02:19:42.000000000 +0200
@@ -2,6 +2,7 @@
 #define	DISSECT_H
 
 #include <stdio.h>
+#include <string.h>
 #include "parse.h"
 #include "expression.h"
 
@@ -32,8 +33,8 @@
 		char __[sizeof(s)];			\
 	} ident = {{					\
 		.len  = sizeof(s)-1,			\
-		.name = s,				\
 	}};						\
+	strcpy(ident.ident.name, s);			\
 	&ident.ident;					\
 })
 
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux