I have the fallowing structs:
struct lshort_sched_param {
int requested_time;
int level;
};
struct sched_param {
union {
int sched_priority;
struct lshort_sched_param lshort_params;
};
};
and i'm trying to create a new instance of them like so:
struct lshort_sched_param *l = {2 ,1};
struct sched_param *p = {3, l};
and get some warnings:
test.c:5: warning: initialization makes pointer from integer without a cast
test.c:5: warning: excess elements in scalar initializer
test.c:5: warning: (near initialization for `l')
test.c:6: warning: initialization makes pointer from integer without a cast
test.c:6: warning: excess elements in scalar initializer
test.c:6: warning: (near initialization for `p')
can anyone help me figure it out?