Clean up some kati warnings

Kati has a `--warn` option that adds some extra Kati-specific warnings
-- like using undefined make functions, undefined user functions, likely
bad variable lookups, etc. Some of these are bugs, others are fine doing
nothing. This fixes up all of them in the core build system.

It also complains about $(eval) usage in a recipe not being recommended.
Those aren't handled as part of this change.

Bug: 72661763
Test: build-aosp_arm.ninja is identical before and after
Change-Id: I8e00af142a7745236d3ad4efc9e91ec3ce71a511
diff --git a/core/definitions.mk b/core/definitions.mk
index 6ccb82b..2be4f59 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1723,6 +1723,10 @@
 $(if $(PRIVATE_ALL_OBJECTS),,$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)AR) d $(1) $(dir $(1))dummy.o \
   && rm -f $(dir $(1))dummy.o)
 endef
+else
+create-dummy.o-if-no-objs =
+get-dummy.o-if-no-objs =
+delete-dummy.o-if-no-objs =
 endif  # HOST_OS is darwin
 
 # Explicitly delete the archive first so that ar doesn't