gcc 4.5.1 c89
compiling with the following flags: -Wall, -Wextra
I have the following structure that I am trying to initialize with default values. However, I get the following warnings:
static struct Device { char *name; char *config; } *app = { NULL, NULL }; Warnings:
warning: initialization from incompatible pointer type warning: excess elements in scalar initializer However, if I do the following by declaring a non-pointer, I don't get any problems i.e.
static struct Device { char *name; char *config; } app = { NULL, NULL }; Why is that?
Many thanks for any advice,