Fix build with gcc.

  This patch "force" gcc not to complain, but the warnings are
  legitimate. Comments suggest that we should refactore where needed.