I think we can move along faster and get some reasonable help from newcomers with these really strict compiler settings, combined with everything fixed to match them. This is mainly to stop some mistakes in much the same way Theos' strict compiler settings do.
I have fixed everything for the standards here and things seem to work about the same as before (iOS 10.1.1).
These changes do not apply to the MiniZip target.
Notes:
With this change, all data types must be handled correctly including signs and explicit casts. Code will not build without it.
All properties should be nonatomic unless explicitly written as atomic.
All (void *) pointer arithmetic should be the same, but since the GNU extension is not allowed, you can cast to any type that has size 1 like (char *) or (uint8_t *) on the pointer variable. We could bring back void pointer arithmetic but this hides intentions (void *p = x; x += y; where sizeof(typeof y) == 1. This is less clear without casts).
CLUTCH_UNUSED(x) should be used instead of (void)x for unused parameters.
I think we can move along faster and get some reasonable help from newcomers with these really strict compiler settings, combined with everything fixed to match them. This is mainly to stop some mistakes in much the same way Theos' strict compiler settings do.
I have fixed everything for the standards here and things seem to work about the same as before (iOS 10.1.1).
These changes do not apply to the MiniZip target.
Notes:
nonatomic
unless explicitly written asatomic
.(void *)
pointer arithmetic should be the same, but since the GNU extension is not allowed, you can cast to any type that has size 1 like(char *)
or(uint8_t *)
on the pointer variable. We could bring back void pointer arithmetic but this hides intentions (void *p = x; x += y;
wheresizeof(typeof y) == 1
. This is less clear without casts).CLUTCH_UNUSED(x)
should be used instead of(void)x
for unused parameters.