Mahonri's Wall of Shame


I have had the pleasure of interacting with some of the best programmers in the world. I have found it interesting that all programmers have flaws. I, myself, have too many to number. It is surprising that even the most intelligent people can make asinine statements. Where I have found remarkable nonsense associated with the C language, I like to make note of it; and where possible, attribute the author.
Using Zero as a Value

typedef enum
   {
   nullday=0,
   sun,
   mon,
   tue,
   wed,
   thu,
   fri,
   sat
   } MahonriDays;

* "I'd have started with -1 as 'undefined day'. Beware that programmers start counting at 0. ;-)" --SO/alk

Casting Void

int MahonriFree(void **ptr)
   {
   free(*ptr);
   *ptr=NULL;
   }

MahonriFree((void **)&a);

* "@MahonriMoriancumer. That's **UB. Your MahonriFree must cast ptr back to its actual type (which it is ignorant of)." --SO/mafso

**UB : undefined behavior