Add some ASSERT32FLAT() to help compiler eliminate dead code.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 13 Feb 2010 23:49:24 +0000 (18:49 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 13 Feb 2010 23:49:24 +0000 (18:49 -0500)
The function pointer passed to run_thread() can confuse the compiler
into thinking the function needs to be emitted.  Add ASSERT32FLAT() to
help the compiler eliminate this code.

src/ata.c
src/ps2port.c
src/usb.c

index a2a670b6667137a658fddab848327be9ce46bfb0..ceb08f2de76e73d3a44bdecf1b1011c157291b53 100644 (file)
--- a/src/ata.c
+++ b/src/ata.c
@@ -1060,6 +1060,7 @@ ata_init(void)
 void
 ata_setup(void)
 {
+    ASSERT32FLAT();
     if (!CONFIG_ATA)
         return;
 
index b52f994439fc4d3cf6c797d8c5e99199ac494830..4cfff28339c178b853a41df66d5c79d3fe2804a7 100644 (file)
@@ -419,6 +419,7 @@ keyboard_init(void *data)
 void
 ps2port_setup(void)
 {
+    ASSERT32FLAT();
     if (! CONFIG_PS2PORT)
         return;
     dprintf(3, "init ps2port\n");
index 12747dbc3dc253dff66f198fad5c7bbfae83704f..9a61f126eb74f3626ba8354a5d9112d47b227519 100644 (file)
--- a/src/usb.c
+++ b/src/usb.c
@@ -197,6 +197,7 @@ fail:
 void
 usb_setup(void)
 {
+    ASSERT32FLAT();
     if (! CONFIG_USB)
         return;