aboutsummaryrefslogtreecommitdiff
path: root/stand/powerpc/kboot/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'stand/powerpc/kboot/main.c')
-rw-r--r--stand/powerpc/kboot/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c
index 633727ca6a7c..25eaf5064489 100644
--- a/stand/powerpc/kboot/main.c
+++ b/stand/powerpc/kboot/main.c
@@ -484,8 +484,18 @@ kboot_kseg_get(int *nseg, void **ptr)
void
_start(int argc, const char **argv, char **env)
{
+// This makes error "variable 'sp' is uninitialized" be just a warning on clang.
+// Initializing 'sp' is not desired here as it would overwrite "r1" original value
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wuninitialized"
+#endif
register volatile void **sp asm("r1");
main((int)sp[0], (const char **)&sp[1]);
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
}
/*