From 77b0a932afd4a8daa291307ec150e3567c4d72ed Mon Sep 17 00:00:00 2001 From: Christian Starkjohann Date: Sun, 30 May 2010 21:00:26 +0000 Subject: - added __attribute__((noreturn)) to all main() functions --- examples/custom-class/firmware/main.c | 3 +-- examples/drivertest/firmware/main.c | 3 +-- examples/hid-custom-rq/firmware/main.c | 3 +-- examples/hid-mouse/firmware/main.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/custom-class/firmware/main.c b/examples/custom-class/firmware/main.c index 22c1e60..b11c245 100644 --- a/examples/custom-class/firmware/main.c +++ b/examples/custom-class/firmware/main.c @@ -62,7 +62,7 @@ static uchar dataBuffer[4]; /* buffer must stay valid when usbFunctionSetup /* ------------------------------------------------------------------------- */ -int main(void) +int __attribute__((noreturn)) main(void) { uchar i; @@ -92,7 +92,6 @@ uchar i; wdt_reset(); usbPoll(); } - return 0; } /* ------------------------------------------------------------------------- */ diff --git a/examples/drivertest/firmware/main.c b/examples/drivertest/firmware/main.c index 0c3d320..fa22152 100644 --- a/examples/drivertest/firmware/main.c +++ b/examples/drivertest/firmware/main.c @@ -75,7 +75,7 @@ usbRequest_t *rq = (void *)data; /* ------------------------------------------------------------------------- */ -int main(void) +int __attribute__((noreturn)) main(void) { uchar i; @@ -123,7 +123,6 @@ uchar i; cli(); sei(); } - return 0; } /* ------------------------------------------------------------------------- */ diff --git a/examples/hid-custom-rq/firmware/main.c b/examples/hid-custom-rq/firmware/main.c index 2909828..e4ade7c 100644 --- a/examples/hid-custom-rq/firmware/main.c +++ b/examples/hid-custom-rq/firmware/main.c @@ -83,7 +83,7 @@ usbRequest_t *rq = (void *)data; /* ------------------------------------------------------------------------- */ -int main(void) +int __attribute__((noreturn)) main(void) { uchar i; @@ -115,7 +115,6 @@ uchar i; wdt_reset(); usbPoll(); } - return 0; } /* ------------------------------------------------------------------------- */ diff --git a/examples/hid-mouse/firmware/main.c b/examples/hid-mouse/firmware/main.c index 8f3fcd5..12c5bdb 100644 --- a/examples/hid-mouse/firmware/main.c +++ b/examples/hid-mouse/firmware/main.c @@ -124,7 +124,7 @@ usbRequest_t *rq = (void *)data; /* ------------------------------------------------------------------------- */ -int main(void) +int __attribute__((noreturn)) main(void) { uchar i; @@ -159,7 +159,6 @@ uchar i; usbSetInterrupt((void *)&reportBuffer, sizeof(reportBuffer)); } } - return 0; } /* ------------------------------------------------------------------------- */ -- cgit v1.2.3