hooks: add a warning to detect unimplemented hooks
[smatch.git] / validation / packed-deref0.c
blobd48ad1ac7505538eeba674a948d58625922e98a7
1 #define __packed __attribute__((packed))
3 typedef struct {
4 __INT8_TYPE__ a;
5 __INT16_TYPE__ b;
6 __INT32_TYPE__ c;
7 } __packed obj_t;
9 _Static_assert(sizeof(obj_t) == 7, "sizeof packed struct");
11 static void foo(obj_t *ptr, int val)
13 ptr->c = val;
16 static void bar(obj_t o)
18 foo(&o, 0);
22 * check-name: packed-deref0