I have a struct defined in .h
struct buf_stats {
// ***
};
then in .c file
struct buf_stats *bs = malloc(sizeof(struct buf_states*)) ;
where buf_states
is a typo.
but gcc does not warn me, although I used -Wall
and this bug/typo cost me 3 hours to find out.
How to make gcc warn undefined struct like this?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With