Fix CFC compiler warnings and compilation with g++