compilation warnings and redundant condition