pc-bios/s390-ccw: Add a proper prototype for main()
authorThomas Huth <thuth@redhat.com>
Mon, 4 Jul 2022 11:18:52 +0000 (13:18 +0200)
committerThomas Huth <thuth@redhat.com>
Wed, 6 Jul 2022 16:33:26 +0000 (18:33 +0200)
Older versions of Clang complain if there is no prototype for main().
Add one, and while we're at it, make sure that we use the same type
for main.c and netmain.c - since the return value does not matter,
declare the return type of main() as "void".

Message-Id: <20220704111903.62400-2-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
pc-bios/s390-ccw/main.c
pc-bios/s390-ccw/s390-ccw.h

index 5d2b7ba94de4f9afcd70d3465f4d0a4ccc83780b..835341457db943f0752f4a0aa6bed097facce5f5 100644 (file)
@@ -281,7 +281,7 @@ static void probe_boot_device(void)
     sclp_print("Could not find a suitable boot device (none specified)\n");
 }
 
-int main(void)
+void main(void)
 {
     sclp_setup();
     css_setup();
@@ -294,5 +294,4 @@ int main(void)
     }
 
     panic("Failed to load OS from hard disk\n");
-    return 0; /* make compiler happy */
 }
index 79db69ff542e344384789acc736a3b889bbcf0a7..b88e0550ab9f53bb10af025511a2dbc945b88287 100644 (file)
@@ -57,6 +57,7 @@ void write_subsystem_identification(void);
 void write_iplb_location(void);
 extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
 unsigned int get_loadparm_index(void);
+void main(void);
 
 /* sclp.c */
 void sclp_print(const char *string);