Use warning function instead of fprintf(stderr, "Warning: ...").