Fix build warning with GCC 4.6 when diagnostic is disabled.