Changeset 6d5da743 in mainline
- Timestamp:
- 2014-04-25T08:10:14Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d815b74, fef725d
- Parents:
- 7cd15b9 (diff), 723ce99 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r7cd15b9 r6d5da743 91 91 $(CONFIG) $< 92 92 93 random-config: $(CONFIG_RULES) 94 $(CONFIG) $< random 95 93 96 # Release files 94 97 -
kernel/arch/mips32/src/debugger.c
r7cd15b9 r6d5da743 97 97 .argv = adde_argv 98 98 }; 99 #endif 99 100 100 101 static struct { … … 147 148 } 148 149 150 #ifdef CONFIG_KCONSOLE 151 149 152 /** Add new breakpoint to table 150 153 * -
kernel/arch/sparc64/src/drivers/kbd.c
r7cd15b9 r6d5da743 90 90 size_t size = ((ofw_ebus_reg_t *) prop->value)->size; 91 91 92 uintptr_t pa ;92 uintptr_t pa = 0; // Prevent -Werror=maybe-uninitialized 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
r7cd15b9 r6d5da743 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
r7cd15b9 r6d5da743 36 36 #define KERN_DIVISION_H_ 37 37 38 #include <cc.h> 39 40 #ifdef CONFIG_LTO 41 #define DO_NOT_DISCARD ATTRIBUTE_USED 42 #else 43 #define DO_NOT_DISCARD 44 #endif 45 38 46 extern int __divsi3(int, int); 39 47 extern long long __divdi3(long long, long long); 40 48 41 49 extern unsigned int __udivsi3(unsigned int, unsigned int); 42 extern unsigned long long __udivdi3(unsigned long long, unsigned long long) ;50 extern unsigned long long __udivdi3(unsigned long long, unsigned long long) DO_NOT_DISCARD; 43 51 44 52 extern int __modsi3(int, int); … … 46 54 47 55 extern unsigned int __umodsi3(unsigned int, unsigned int); 48 extern unsigned long long __umoddi3(unsigned long long, unsigned long long) ;56 extern unsigned long long __umoddi3(unsigned long long, unsigned long long) DO_NOT_DISCARD; 49 57 50 58 extern int __divmodsi3(int, int, int *); -
kernel/generic/include/cc.h
r7cd15b9 r6d5da743 40 40 #define ATTRIBUTE_OPTIMIZE(opt) \ 41 41 __attribute__ ((optimize(opt))) 42 #define ATTRIBUTE_USED \ 43 __attribute__ ((used)) 42 44 #else 43 45 #define ATTRIBUTE_OPTIMIZE(opt) 46 #define ATTRIBUTE_USED 44 47 #endif 45 48 -
kernel/generic/include/debug.h
r7cd15b9 r6d5da743 37 37 38 38 #include <panic.h> 39 #include <log.h> 39 40 #include <symtab_lookup.h> 40 41 -
kernel/generic/include/lib/memfnc.h
r7cd15b9 r6d5da743 39 39 #include <cc.h> 40 40 41 #ifdef CONFIG_LTO 42 #define DO_NOT_DISCARD ATTRIBUTE_USED 43 #else 44 #define DO_NOT_DISCARD 45 #endif 46 41 47 extern void *memset(void *, int, size_t) 42 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") ;48 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD; 43 49 extern void *memcpy(void *, const void *, size_t) 44 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") ;50 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD; 45 51 46 52 #endif -
kernel/generic/include/memstr.h
r7cd15b9 r6d5da743 37 37 38 38 #include <typedefs.h> 39 #include <cc.h> 40 41 #ifdef CONFIG_LTO 42 #define DO_NOT_DISCARD ATTRIBUTE_USED 43 #else 44 #define DO_NOT_DISCARD 45 #endif 39 46 40 47 #define memset(dst, val, cnt) __builtin_memset((dst), (val), (cnt)) … … 43 50 extern void memsetb(void *, size_t, uint8_t); 44 51 extern void memsetw(void *, size_t, uint16_t); 45 extern void *memmove(void *, const void *, size_t) ;52 extern void *memmove(void *, const void *, size_t) DO_NOT_DISCARD; 46 53 47 54 #endif -
kernel/generic/src/console/cmd.c
r7cd15b9 r6d5da743 1149 1149 int cmd_set4(cmd_arg_t *argv) 1150 1150 { 1151 uintptr_t addr ;1151 uintptr_t addr = 0; // Prevent -Werror=maybe-uninitialized 1152 1152 uint32_t arg1 = argv[1].intval; 1153 1153 bool pointer = false; -
kernel/generic/src/mm/as.c
r7cd15b9 r6d5da743 1725 1725 ASSERT(count); 1726 1726 1727 btree_node_t *leaf ;1727 btree_node_t *leaf = NULL; 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); 1735 1737 1736 1738 if (!leaf->keys) { -
kernel/generic/src/mm/frame.c
r7cd15b9 r6d5da743 391 391 392 392 /* Allocate frames from zone */ 393 size_t index ;393 size_t index = (size_t) -1; 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); 398 399 399 400 /* Update frame reference count */ -
kernel/generic/src/udebug/udebug_ipc.c
r7cd15b9 r6d5da743 343 343 sysarg_t uspace_addr; 344 344 sysarg_t to_copy; 345 void *buffer ;345 void *buffer = NULL; 346 346 int rc; 347 347 … … 354 354 return; 355 355 } 356 357 ASSERT(buffer != NULL); 356 358 357 359 /* … … 385 387 sysarg_t uspace_src; 386 388 unsigned size; 387 void *buffer ;389 void *buffer = NULL; 388 390 int rc; 389 391 … … 398 400 return; 399 401 } 402 403 ASSERT(buffer != NULL); 400 404 401 405 IPC_SET_RETVAL(call->data, 0); -
tools/config.py
r7cd15b9 r6d5da743 40 40 import subprocess 41 41 import xtui 42 import random 42 43 43 44 RULES_FILE = sys.argv[1] … … 256 257 257 258 return True 259 260 ## Fill the configuration with random (but valid) values. 261 # 262 # The random selection takes next rule and if the condition does 263 # not violate existing configuration, random value of the variable 264 # 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 the 267 # variable or ignoring the variable altogether. 268 # 269 # @param config Configuration to work on 270 # @param rules Rules 271 # @param start_index With which rule to start (initial call must specify 0 here). 272 # @return True if able to find a valid configuration 273 def random_choices(config, rules, start_index): 274 "Fill the configuration with random (but valid) values." 275 if start_index >= len(rules): 276 return True 277 278 varname, vartype, name, choices, cond = rules[start_index] 279 280 # First check that this rule would make sense 281 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 backtracking 286 yes_no = 0 287 choices_indexes = range(0, len(choices)) 288 random.shuffle(choices_indexes) 289 290 # Remember current configuration value 291 old_value = None 292 try: 293 old_value = config[varname] 294 except KeyError: 295 old_value = None 296 297 # For yes/no choices, we ran the loop at most 2 times, for select 298 # choices as many times as there are options. 299 try_counter = 0 300 while True: 301 if vartype == 'choice': 302 if try_counter >= len(choices_indexes): 303 break 304 value = choices[choices_indexes[try_counter]][0] 305 elif vartype == 'y' or vartype == 'n': 306 if try_counter > 0: 307 break 308 value = vartype 309 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_no 314 else: 315 break 316 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] = value 324 325 ok = random_choices(config, rules, start_index + 1) 326 if ok: 327 return True 328 329 try_counter = try_counter + 1 330 331 # Restore the old value and backtrack 332 # (need to delete to prevent "ghost" variables that do not exist under 333 # certain configurations) 334 config[varname] = old_value 335 if old_value is None: 336 del config[varname] 337 338 return random_choices(config, rules, start_index + 1) 339 258 340 259 341 ## Get default value from a rule. … … 555 637 return 1 556 638 639 # Random mode 640 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 2 645 if not infer_verify_choices(config, rules): 646 sys.stderr.write("Internal error: random configuration not consistent.\n") 647 return 2 648 preprocess_config(config, rules) 649 create_output(MAKEFILE, MACROS, config, rules) 650 651 return 0 652 557 653 screen = xtui.screen_init() 558 654 try: -
uspace/drv/bus/pci/pciintel/pci.c
r7cd15b9 r6d5da743 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 ;286 uint32_t val = 0; // Prevent -Werror=maybe-uninitialized 287 287 288 288 fibril_mutex_lock(&bus->conf_mutex); -
uspace/lib/softint/generic/shift.c
r7cd15b9 r6d5da743 128 128 } 129 129 130 long long __aeabi_llsr(long long val, int shift) 131 { 132 return __lshrdi3(val, shift); 133 } 134 130 135 /** @} 131 136 */ -
uspace/lib/softint/include/shift.h
r7cd15b9 r6d5da743 49 49 /* ARM EABI */ 50 50 extern long long __aeabi_llsl(long long, int); 51 extern long long __aeabi_llsr(long long, int); 51 52 52 53 #endif -
uspace/srv/net/dhcp/transport.c
r7cd15b9 r6d5da743 172 172 dhcp_transport_t *dt = (dhcp_transport_t *)arg; 173 173 void *msg; 174 size_t size ;174 size_t size = (size_t) -1; 175 175 int rc; 176 176 … … 179 179 if (rc != EOK) 180 180 break; 181 182 assert(size != (size_t) -1); 181 183 182 184 dt->recv_cb(dt->cb_arg, msg, size); -
uspace/srv/net/dnsrsrv/dns_msg.c
r7cd15b9 r6d5da743 487 487 size_t size; 488 488 dns_header_t hdr; 489 size_t q_size ;489 size_t q_size = 0; 490 490 size_t di; 491 491 int rc; … … 515 515 return rc; 516 516 517 assert(q_size > 0); 518 517 519 size += q_size; 518 520 } … … 532 534 return rc; 533 535 } 536 537 assert(q_size > 0); 534 538 535 539 di += q_size; -
uspace/srv/net/dnsrsrv/transport.c
r7cd15b9 r6d5da743 286 286 static int transport_recv_fibril(void *arg) 287 287 { 288 dns_message_t *resp ;288 dns_message_t *resp = NULL; 289 289 trans_req_t *treq; 290 290 int rc; … … 294 294 if (rc != EOK) 295 295 continue; 296 297 assert(resp != NULL); 296 298 297 299 fibril_mutex_lock(&treq_lock);
Note:
See TracChangeset
for help on using the changeset viewer.