@@ -24,7 +24,8 @@ my_buff_evt_fn(lwrb_t* buff, lwrb_evt_type_t type, lwrb_sz_t len) {
2424}
2525
2626int
27- main () {
27+ main (void ) {
28+ int retval = 0 ;
2829 lwrb_sz_t len ;
2930
3031 /* Init buffer */
@@ -41,7 +42,7 @@ main() {
4142 (unsigned)(_rw_len_), (unsigned)is_as_expected); \
4243 if (!is_as_expected) { \
4344 printf("Test failed on line %u", (unsigned)__LINE__); \
44- return -1; \
45+ retval = -1; \
4546 } \
4647 } while (0)
4748
@@ -74,7 +75,7 @@ main() {
7475 (unsigned)buff.r_ptr, (unsigned)(_success_), (unsigned)(_rw_len_), (unsigned)is_as_expected); \
7576 if (!is_as_expected) { \
7677 printf("Test failed on line %u", (unsigned)__LINE__); \
77- return -1; \
78+ retval = -1; \
7879 } \
7980 } while (0)
8081
@@ -111,7 +112,7 @@ main() {
111112 (unsigned)is_as_expected); \
112113 if (!is_as_expected) { \
113114 printf("Test failed on line %u", (unsigned)__LINE__); \
114- return -1; \
115+ retval = -1; \
115116 } \
116117 } while (0)
117118
@@ -158,7 +159,7 @@ main() {
158159 (unsigned)is_as_expected); \
159160 if (!is_as_expected) { \
160161 printf("Test failed on line %u", (unsigned)__LINE__); \
161- return -1; \
162+ retval = -1; \
162163 } \
163164 } while (0)
164165
@@ -201,7 +202,7 @@ main() {
201202 (_bts_len_), (_start_offset_), (int)found_idx, (int)found, (int)is_as_expected); \
202203 if (!is_as_expected) { \
203204 printf("Test failed on line %u", (unsigned)__LINE__); \
204- return -1; \
205+ retval = -1; \
205206 } \
206207 } while (0)
207208
@@ -236,6 +237,6 @@ main() {
236237#undef FIND_TEST
237238 }
238239
239- printf ("All completed !\r\n" );
240- return 0 ;
240+ printf ("Done !\r\n" );
241+ return retval ;
241242}
0 commit comments