set to C99, turn on warnings
fix error and warnings about getopt