Changes in / [6d5da743:7cd15b9] in mainline
- Files:
-
- 1 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r6d5da743 r7cd15b9 91 91 $(CONFIG) $< 92 92 93 random-config: $(CONFIG_RULES)94 $(CONFIG) $< random95 96 93 # Release files 97 94 -
kernel/arch/mips32/src/debugger.c
r6d5da743 r7cd15b9 97 97 .argv = adde_argv 98 98 }; 99 #endif100 99 101 100 static struct { … … 148 147 } 149 148 150 #ifdef CONFIG_KCONSOLE151 152 149 /** Add new breakpoint to table 153 150 * -
kernel/arch/sparc64/src/drivers/kbd.c
r6d5da743 r7cd15b9 90 90 size_t size = ((ofw_ebus_reg_t *) prop->value)->size; 91 91 92 uintptr_t pa = 0; // Prevent -Werror=maybe-uninitialized92 uintptr_t pa; 93 93 if (!ofw_ebus_apply_ranges(node->parent, 94 94 ((ofw_ebus_reg_t *) prop->value), &pa)) { -
kernel/arch/sparc64/src/smp/sun4v/smp.c
r6d5da743 r7cd15b9 263 263 while (md_next_child(&it)) { 264 264 md_node_t child = md_get_child_node(it); 265 const char *exec_unit_type = "";265 const char *exec_unit_type; 266 266 md_get_string_property(child, "type", &exec_unit_type); 267 267 -
kernel/genarch/include/genarch/softint/division.h
r6d5da743 r7cd15b9 36 36 #define KERN_DIVISION_H_ 37 37 38 #include <cc.h>39 40 #ifdef CONFIG_LTO41 #define DO_NOT_DISCARD ATTRIBUTE_USED42 #else43 #define DO_NOT_DISCARD44 #endif45 46 38 extern int __divsi3(int, int); 47 39 extern long long __divdi3(long long, long long); 48 40 49 41 extern unsigned int __udivsi3(unsigned int, unsigned int); 50 extern unsigned long long __udivdi3(unsigned long long, unsigned long long) DO_NOT_DISCARD;42 extern unsigned long long __udivdi3(unsigned long long, unsigned long long); 51 43 52 44 extern int __modsi3(int, int); … … 54 46 55 47 extern unsigned int __umodsi3(unsigned int, unsigned int); 56 extern unsigned long long __umoddi3(unsigned long long, unsigned long long) DO_NOT_DISCARD;48 extern unsigned long long __umoddi3(unsigned long long, unsigned long long); 57 49 58 50 extern int __divmodsi3(int, int, int *); -
kernel/generic/include/cc.h
r6d5da743 r7cd15b9 40 40 #define ATTRIBUTE_OPTIMIZE(opt) \ 41 41 __attribute__ ((optimize(opt))) 42 #define ATTRIBUTE_USED \43 __attribute__ ((used))44 42 #else 45 43 #define ATTRIBUTE_OPTIMIZE(opt) 46 #define ATTRIBUTE_USED47 44 #endif 48 45 -
kernel/generic/include/debug.h
r6d5da743 r7cd15b9 37 37 38 38 #include <panic.h> 39 #include <log.h>40 39 #include <symtab_lookup.h> 41 40 -
kernel/generic/include/lib/memfnc.h
r6d5da743 r7cd15b9 39 39 #include <cc.h> 40 40 41 #ifdef CONFIG_LTO42 #define DO_NOT_DISCARD ATTRIBUTE_USED43 #else44 #define DO_NOT_DISCARD45 #endif46 47 41 extern void *memset(void *, int, size_t) 48 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD;42 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns"); 49 43 extern void *memcpy(void *, const void *, size_t) 50 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD;44 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns"); 51 45 52 46 #endif -
kernel/generic/include/memstr.h
r6d5da743 r7cd15b9 37 37 38 38 #include <typedefs.h> 39 #include <cc.h>40 41 #ifdef CONFIG_LTO42 #define DO_NOT_DISCARD ATTRIBUTE_USED43 #else44 #define DO_NOT_DISCARD45 #endif46 39 47 40 #define memset(dst, val, cnt) __builtin_memset((dst), (val), (cnt)) … … 50 43 extern void memsetb(void *, size_t, uint8_t); 51 44 extern void memsetw(void *, size_t, uint16_t); 52 extern void *memmove(void *, const void *, size_t) DO_NOT_DISCARD;45 extern void *memmove(void *, const void *, size_t); 53 46 54 47 #endif -
kernel/generic/src/console/cmd.c
r6d5da743 r7cd15b9 1149 1149 int cmd_set4(cmd_arg_t *argv) 1150 1150 { 1151 uintptr_t addr = 0; // Prevent -Werror=maybe-uninitialized1151 uintptr_t addr; 1152 1152 uint32_t arg1 = argv[1].intval; 1153 1153 bool pointer = false; -
kernel/generic/src/mm/as.c
r6d5da743 r7cd15b9 1725 1725 ASSERT(count); 1726 1726 1727 btree_node_t *leaf = NULL;1727 btree_node_t *leaf; 1728 1728 size_t pages = (size_t) btree_search(&area->used_space, page, &leaf); 1729 1729 if (pages) { … … 1733 1733 return false; 1734 1734 } 1735 1736 ASSERT(leaf != NULL);1737 1735 1738 1736 if (!leaf->keys) { -
kernel/generic/src/mm/frame.c
r6d5da743 r7cd15b9 391 391 392 392 /* Allocate frames from zone */ 393 size_t index = (size_t) -1;393 size_t index; 394 394 int avail = bitmap_allocate_range(&zone->bitmap, count, zone->base, 395 395 FRAME_LOWPRIO, constraint, &index); 396 396 397 397 ASSERT(avail); 398 ASSERT(index != (size_t) -1);399 398 400 399 /* Update frame reference count */ -
kernel/generic/src/udebug/udebug_ipc.c
r6d5da743 r7cd15b9 343 343 sysarg_t uspace_addr; 344 344 sysarg_t to_copy; 345 void *buffer = NULL;345 void *buffer; 346 346 int rc; 347 347 … … 354 354 return; 355 355 } 356 357 ASSERT(buffer != NULL);358 356 359 357 /* … … 387 385 sysarg_t uspace_src; 388 386 unsigned size; 389 void *buffer = NULL;387 void *buffer; 390 388 int rc; 391 389 … … 400 398 return; 401 399 } 402 403 ASSERT(buffer != NULL);404 400 405 401 IPC_SET_RETVAL(call->data, 0); -
tools/config.py
r6d5da743 r7cd15b9 40 40 import subprocess 41 41 import xtui 42 import random43 42 44 43 RULES_FILE = sys.argv[1] … … 257 256 258 257 return True 259 260 ## Fill the configuration with random (but valid) values.261 #262 # The random selection takes next rule and if the condition does263 # not violate existing configuration, random value of the variable264 # is selected.265 # This happens recursively as long as there are more rules.266 # If a conflict is found, we backtrack and try other settings of the267 # variable or ignoring the variable altogether.268 #269 # @param config Configuration to work on270 # @param rules Rules271 # @param start_index With which rule to start (initial call must specify 0 here).272 # @return True if able to find a valid configuration273 def random_choices(config, rules, start_index):274 "Fill the configuration with random (but valid) values."275 if start_index >= len(rules):276 return True277 278 varname, vartype, name, choices, cond = rules[start_index]279 280 # First check that this rule would make sense281 if cond:282 if not check_condition(cond, config, rules):283 return random_choices(config, rules, start_index + 1)284 285 # Remember previous choices for backtracking286 yes_no = 0287 choices_indexes = range(0, len(choices))288 random.shuffle(choices_indexes)289 290 # Remember current configuration value291 old_value = None292 try:293 old_value = config[varname]294 except KeyError:295 old_value = None296 297 # For yes/no choices, we ran the loop at most 2 times, for select298 # choices as many times as there are options.299 try_counter = 0300 while True:301 if vartype == 'choice':302 if try_counter >= len(choices_indexes):303 break304 value = choices[choices_indexes[try_counter]][0]305 elif vartype == 'y' or vartype == 'n':306 if try_counter > 0:307 break308 value = vartype309 elif vartype == 'y/n' or vartype == 'n/y':310 if try_counter == 0:311 yes_no = random.randint(0, 1)312 elif try_counter == 1:313 yes_no = 1 - yes_no314 else:315 break316 if yes_no == 0:317 value = 'n'318 else:319 value = 'y'320 else:321 raise RuntimeError("Unknown variable type: %s" % vartype)322 323 config[varname] = value324 325 ok = random_choices(config, rules, start_index + 1)326 if ok:327 return True328 329 try_counter = try_counter + 1330 331 # Restore the old value and backtrack332 # (need to delete to prevent "ghost" variables that do not exist under333 # certain configurations)334 config[varname] = old_value335 if old_value is None:336 del config[varname]337 338 return random_choices(config, rules, start_index + 1)339 340 258 341 259 ## Get default value from a rule. … … 637 555 return 1 638 556 639 # Random mode640 if (len(sys.argv) == 3) and (sys.argv[2] == 'random'):641 ok = random_choices(config, rules, 0)642 if not ok:643 sys.stderr.write("Internal error: unable to generate random config.\n")644 return 2645 if not infer_verify_choices(config, rules):646 sys.stderr.write("Internal error: random configuration not consistent.\n")647 return 2648 preprocess_config(config, rules)649 create_output(MAKEFILE, MACROS, config, rules)650 651 return 0652 653 557 screen = xtui.screen_init() 654 558 try: -
uspace/drv/bus/pci/pciintel/pci.c
r6d5da743 r7cd15b9 284 284 const uint32_t conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg); 285 285 pci_bus_t *bus = pci_bus_from_fun(fun); 286 uint32_t val = 0; // Prevent -Werror=maybe-uninitialized286 uint32_t val; 287 287 288 288 fibril_mutex_lock(&bus->conf_mutex); -
uspace/lib/softint/generic/shift.c
r6d5da743 r7cd15b9 128 128 } 129 129 130 long long __aeabi_llsr(long long val, int shift)131 {132 return __lshrdi3(val, shift);133 }134 135 130 /** @} 136 131 */ -
uspace/lib/softint/include/shift.h
r6d5da743 r7cd15b9 49 49 /* ARM EABI */ 50 50 extern long long __aeabi_llsl(long long, int); 51 extern long long __aeabi_llsr(long long, int);52 51 53 52 #endif -
uspace/srv/net/dhcp/transport.c
r6d5da743 r7cd15b9 172 172 dhcp_transport_t *dt = (dhcp_transport_t *)arg; 173 173 void *msg; 174 size_t size = (size_t) -1;174 size_t size; 175 175 int rc; 176 176 … … 179 179 if (rc != EOK) 180 180 break; 181 182 assert(size != (size_t) -1);183 181 184 182 dt->recv_cb(dt->cb_arg, msg, size); -
uspace/srv/net/dnsrsrv/dns_msg.c
r6d5da743 r7cd15b9 487 487 size_t size; 488 488 dns_header_t hdr; 489 size_t q_size = 0;489 size_t q_size; 490 490 size_t di; 491 491 int rc; … … 515 515 return rc; 516 516 517 assert(q_size > 0);518 519 517 size += q_size; 520 518 } … … 534 532 return rc; 535 533 } 536 537 assert(q_size > 0);538 534 539 535 di += q_size; -
uspace/srv/net/dnsrsrv/transport.c
r6d5da743 r7cd15b9 286 286 static int transport_recv_fibril(void *arg) 287 287 { 288 dns_message_t *resp = NULL;288 dns_message_t *resp; 289 289 trans_req_t *treq; 290 290 int rc; … … 294 294 if (rc != EOK) 295 295 continue; 296 297 assert(resp != NULL);298 296 299 297 fibril_mutex_lock(&treq_lock);
Note:
See TracChangeset
for help on using the changeset viewer.