Fix warning on overwrite-only

This function is unused in overwrite-only mode.  Clang seems to catch
this, whereas gcc does not.  Add the proper ifdefs so that the
simulator tests all pass on MacOS.

Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index 77fa63e..882cb84 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -779,6 +779,7 @@
     return rc;
 }
 
+#ifndef MCUBOOT_OVERWRITE_ONLY
 static inline int
 boot_status_init_by_id(int flash_area_id, const struct boot_status *bs)
 {
@@ -807,6 +808,7 @@
 
     return 0;
 }
+#endif
 
 #ifndef MCUBOOT_OVERWRITE_ONLY
 static int