From: Christian Lamparter Date: Sun, 23 Jan 2011 21:01:05 +0000 (+0100) Subject: carl9170 firmware: fix gcc alignment warnings X-Git-Tag: 1.9.3~12 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=c5a9a5412641268233e2b45a837c302347f0cb5a;p=carl9170fw.git carl9170 firmware: fix gcc alignment warnings warning: cast increases required alignment of target type. Signed-off-by: Christian Lamparter --- diff --git a/include/linux/compiler.h b/include/linux/compiler.h index f6f1444..d331f3c 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -78,7 +78,7 @@ #define container_of(ptr, type, member) ({ \ const typeof(((type *)0)->member) * __mptr = (ptr); \ - (type *)((char *)__mptr - offsetof(type, member)); }) + (type *)(((unsigned long)__mptr - offsetof(type, member))); }) #define MAX_ERRNO 4095