On Mon, Mar 26, 2012 at 1:58 PM, Ullrich von Bassewitz <uz@musoftware.de>wrote: > > On Mon, Mar 26, 2012 at 01:31:48PM -0500, Payton Byrd wrote: > > Found and fixed the problem in the above code. There is no return > > statement in this function, so the return value was random memory > > locations which meant code was getting overwritten. Is there not > > supposed to be a warning or error generated in such a scenario? > > I get > > test.c(43): Warning: Control reaches end of non-void function > > when trying to compile the code. Apart from that I would not hardcode the > size > of the "name" field (17) in cbm_direntry and instead use sizeof. Your code > will break if the header file changes. > > Would it be possible to get a pragma that throws a compile error instead of a warning? ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Mon Mar 26 21:01:26 2012
This archive was generated by hypermail 2.1.8 : 2012-03-26 21:01:29 CEST