- Timestamp:
- 2015-06-01T00:04:05Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 53031c2
- Parents:
- 91deaff
- Location:
- uspace
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r91deaff r193d280c 108 108 } 109 109 110 static void waitprompt( )110 static void waitprompt(void) 111 111 { 112 112 console_set_pos(console, 0, console_rows-1); … … 120 120 } 121 121 122 static void waitkey( )122 static void waitkey(void) 123 123 { 124 124 cons_event_t ev; … … 149 149 } 150 150 151 static void newpage( )151 static void newpage(void) 152 152 { 153 153 console_clear(console); -
uspace/app/bdsh/input.c
r91deaff r193d280c 219 219 } 220 220 221 void print_pipe_usage( )221 void print_pipe_usage(void) 222 222 { 223 223 printf("Invalid syntax!\n"); -
uspace/app/trace/trace.c
r91deaff r193d280c 730 730 } 731 731 732 static void print_syntax( )732 static void print_syntax(void) 733 733 { 734 734 printf("Syntax:\n"); -
uspace/drv/bus/usb/vhc/devconn.c
r91deaff r193d280c 32 32 33 33 34 static vhc_virtdev_t *vhc_virtdev_create( )34 static vhc_virtdev_t *vhc_virtdev_create(void) 35 35 { 36 36 vhc_virtdev_t *dev = malloc(sizeof(vhc_virtdev_t)); -
uspace/lib/c/generic/getopt.c
r91deaff r193d280c 95 95 * Compute the greatest common divisor of a and b. 96 96 */ 97 static int 98 gcd(a, b) 99 int a; 100 int b; 97 static int gcd(int a, int b) 101 98 { 102 99 int c; 103 100 104 101 c = a % b; 105 102 while (c != 0) { … … 108 105 c = a % b; 109 106 } 110 107 111 108 return b; 112 109 } … … 117 114 * in each block). 118 115 */ 119 static void 120 permute_args(panonopt_start, panonopt_end, opt_end, nargv) 121 int panonopt_start; 122 int panonopt_end; 123 int opt_end; 124 char **nargv; 116 static void permute_args(int panonopt_start, int panonopt_end, int opt_end, 117 char **nargv) 125 118 { 126 119 int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; … … 157 150 * Returns -2 if -- is found (can be long option or end of options marker). 158 151 */ 159 static int 160 getopt_internal(nargc, nargv, options) 161 int nargc; 162 char **nargv; 163 const char *options; 152 static int getopt_internal(int nargc, char **nargv, const char *options) 164 153 { 165 154 const char *oli; /* option letter list index */ … … 299 288 * Parse argc/argv argument vector. 300 289 */ 301 int 302 getopt(nargc, nargv, options) 303 int nargc; 304 char * const *nargv; 305 const char *options; 290 int getopt(int nargc, char * const *nargv, const char *options) 306 291 { 307 292 int retval; … … 332 317 * Parse argc/argv argument vector. 333 318 */ 334 int 335 getopt_long(nargc, nargv, options, long_options, idx) 336 int nargc; 337 char * const *nargv; 338 const char *options; 339 const struct option *long_options; 340 int *idx; 319 int getopt_long(int nargc, char * const *nargv, const char *options, 320 const struct option *long_options, int *idx) 341 321 { 342 322 int retval; -
uspace/lib/ieee80211/src/ieee80211.c
r91deaff r193d280c 718 718 * 719 719 */ 720 ieee80211_dev_t *ieee80211_device_create( )720 ieee80211_dev_t *ieee80211_device_create(void) 721 721 { 722 722 return calloc(1, sizeof(ieee80211_dev_t)); -
uspace/lib/pcut/src/run.c
r91deaff r193d280c 73 73 static int default_suite_initialized = 0; 74 74 75 static void init_default_suite_when_needed() { 76 if (default_suite_initialized) { 75 static void init_default_suite_when_needed(void) 76 { 77 if (default_suite_initialized) 77 78 return; 78 }79 79 80 default_suite.id = -1; 80 81 default_suite.kind = PCUT_KIND_TESTSUITE; … … 91 92 * @return Always a valid test suite item. 92 93 */ 93 static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it) { 94 static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it) 95 { 94 96 while (it != NULL) { 95 if (it->kind == PCUT_KIND_TESTSUITE) {97 if (it->kind == PCUT_KIND_TESTSUITE) 96 98 return it; 97 }99 98 100 it = it->previous; 99 101 } 102 100 103 init_default_suite_when_needed(); 101 104 return &default_suite; … … 106 109 * @param func Function to run (can be NULL). 107 110 */ 108 static void run_setup_teardown(pcut_setup_func_t func) { 109 if (func != NULL) { 111 static void run_setup_teardown(pcut_setup_func_t func) 112 { 113 if (func != NULL) 110 114 func(); 111 }112 115 } 113 116 … … 119 122 * @param outcome Outcome of the current test. 120 123 */ 121 static void leave_test(int outcome) { 124 static void leave_test(int outcome) 125 { 122 126 PCUT_DEBUG("leave_test(outcome=%d), will_exit=%s", outcome, 123 124 if (leave_means_exit) {127 leave_means_exit ? "yes" : "no"); 128 if (leave_means_exit) 125 129 exit(outcome); 126 } 127 130 128 131 #ifndef PCUT_NO_LONG_JUMP 129 132 longjmp(start_test_jump, 1); … … 138 141 * @param message Message describing the failure. 139 142 */ 140 void pcut_failed_assertion(const char *message) { 143 void pcut_failed_assertion(const char *message) 144 { 141 145 static const char *prev_message = NULL; 146 142 147 /* 143 148 * The assertion failed. We need to abort the current test, … … 145 150 * include running the tear-down routine. 146 151 */ 147 if (print_test_error) {152 if (print_test_error) 148 153 pcut_print_fail_message(message); 149 } 150 154 151 155 if (execute_teardown_on_failure) { 152 156 execute_teardown_on_failure = 0; 153 157 prev_message = message; 154 158 run_setup_teardown(current_suite->teardown_func); 155 159 156 160 /* Tear-down was okay. */ 157 161 if (report_test_result) { … … 165 169 } 166 170 } 167 171 168 172 prev_message = NULL; 169 173 170 174 leave_test(TEST_OUTCOME_FAIL); /* No return. */ 171 175 } … … 176 180 * @return Error status (zero means success). 177 181 */ 178 static int run_test(pcut_item_t *test) { 182 static int run_test(pcut_item_t *test) 183 { 179 184 /* 180 185 * Set here as the returning point in case of test failure. … … 182 187 * test execution. 183 188 */ 189 184 190 #ifndef PCUT_NO_LONG_JUMP 185 191 int test_finished = setjmp(start_test_jump); 186 if (test_finished) {192 if (test_finished) 187 193 return 1; 188 }189 194 #endif 190 191 if (report_test_result) {195 196 if (report_test_result) 192 197 pcut_report_test_start(test); 193 } 194 198 195 199 current_suite = pcut_find_parent_suite(test); 196 200 current_test = test; 197 201 198 202 pcut_hook_before_test(test); 199 203 200 204 /* 201 205 * If anything goes wrong, execute the tear-down function … … 203 207 */ 204 208 execute_teardown_on_failure = 1; 205 209 206 210 /* 207 211 * Run the set-up function. 208 212 */ 209 213 run_setup_teardown(current_suite->setup_func); 210 214 211 215 /* 212 216 * The setup function was performed, it is time to run … … 214 218 */ 215 219 test->test_func(); 216 220 217 221 /* 218 222 * Finally, run the tear-down function. We need to clear … … 221 225 execute_teardown_on_failure = 0; 222 226 run_setup_teardown(current_suite->teardown_func); 223 227 224 228 /* 225 229 * If we got here, it means everything went well with 226 230 * this test. 227 231 */ 228 if (report_test_result) {232 if (report_test_result) 229 233 pcut_report_test_done(current_test, TEST_OUTCOME_PASS, 230 NULL, NULL, NULL); 231 } 232 234 NULL, NULL, NULL); 235 233 236 return 0; 234 237 } … … 242 245 * @return Error status (zero means success). 243 246 */ 244 int pcut_run_test_forked(pcut_item_t *test) { 245 int rc; 246 247 int pcut_run_test_forked(pcut_item_t *test) 248 { 247 249 report_test_result = 0; 248 250 print_test_error = 1; 249 251 leave_means_exit = 1; 250 251 rc = run_test(test);252 252 253 int rc = run_test(test); 254 253 255 current_test = NULL; 254 256 current_suite = NULL; 255 257 256 258 return rc; 257 259 } … … 265 267 * @return Error status (zero means success). 266 268 */ 267 int pcut_run_test_single(pcut_item_t *test) { 268 int rc; 269 269 int pcut_run_test_single(pcut_item_t *test) 270 { 270 271 report_test_result = 1; 271 272 print_test_error = 0; 272 273 leave_means_exit = 0; 273 274 rc = run_test(test);275 274 275 int rc = run_test(test); 276 276 277 current_test = NULL; 277 278 current_suite = NULL; 278 279 279 280 return rc; 280 281 } … … 285 286 * @return Timeout in seconds. 286 287 */ 287 int pcut_get_test_timeout(pcut_item_t *test) { 288 int pcut_get_test_timeout(pcut_item_t *test) 289 { 288 290 int timeout = PCUT_DEFAULT_TEST_TIMEOUT; 289 291 pcut_extra_t *extras = test->extras; 290 291 292 292 293 while (extras->type != PCUT_EXTRA_LAST) { 293 if (extras->type == PCUT_EXTRA_TIMEOUT) {294 if (extras->type == PCUT_EXTRA_TIMEOUT) 294 295 timeout = extras->timeout; 295 }296 296 297 extras++; 297 298 } 298 299 299 300 return timeout; 300 301 } -
uspace/lib/posix/source/signal.c
r91deaff r193d280c 382 382 * Raise all unblocked previously queued signals. 383 383 */ 384 static void _dequeue_unblocked_signals( )384 static void _dequeue_unblocked_signals(void) 385 385 { 386 386 link_t *iterator = _signal_queue.head.next; -
uspace/srv/bd/sata_bd/sata_bd.c
r91deaff r193d280c 147 147 * 148 148 */ 149 static int get_sata_disks( )149 static int get_sata_disks(void) 150 150 { 151 151 devman_handle_t root_fun; -
uspace/srv/klog/klog.c
r91deaff r193d280c 51 51 #include <io/logctl.h> 52 52 53 #define NAME 53 #define NAME "klog" 54 54 55 55 typedef size_t __attribute__ ((aligned(1))) unaligned_size_t; … … 98 98 * 99 99 */ 100 static void producer( )100 static void producer(void) 101 101 { 102 102 int read = klog_read(buffer, BUFFER_SIZE);
Note:
See TracChangeset
for help on using the changeset viewer.