Fix build for gcc48.

Mark variable unused as gcc48 can detect that it is actually unused:
register.c:105:9: error: variable 'metadata_only' set but not used [-Werror=unused-but-set-variable]
  bool   metadata_only = false;
         ^