Changeset 5a95b25 in mainline


Ignore:
Timestamp:
2005-12-13T11:23:14Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91ef0d95
Parents:
5bb8e45
Message:

Cleanups to make it compile with -Wall. Did not catch everything yet.

Files:
13 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/mps.c

    r5bb8e45 r5a95b25  
    323323
    324324        /* this ioapic is marked unusable */
    325         if (ioa->io_apic_flags & 1 == 0)
     325        if ((ioa->io_apic_flags & 1) == 0)
    326326                return;
    327327       
  • arch/mips32/src/debugger.c

    r5bb8e45 r5a95b25  
    232232                        panic("Weird breakpoint state.\n");
    233233                if (!cur->executing) {
    234                         printf("***Breakpoint %d: %p in %s.\n", i,
     234                        printf("***Breakpoint %d: 0x%p in %s.\n", i,
    235235                               pstate->epc,symbol);
    236236                        /* Return first instruction back */
     
    249249                }
    250250        } else {
    251                 printf("***Breakpoint %p in %s.\n", pstate->epc, symbol);
     251                printf("***Breakpoint 0x%p in %s.\n", pstate->epc, symbol);
    252252                /* Move on to next instruction */
    253253                pstate->epc += 4;
  • arch/mips32/src/exception.c

    r5bb8e45 r5a95b25  
    112112}
    113113
     114#ifdef CONFIG_FPU_LAZY
    114115static void cpuns_exception(int n, void *data)
    115116{
     
    119120                panic("unhandled Coprocessor Unusable Exception\n");
    120121}
     122#endif
    121123
    122124static void interrupt_exception(int n, void *pstate)
  • arch/mips32/src/fmath.c

    r5bb8e45 r5a95b25  
    4444double fmath_get_decimal_exponent(double num)
    4545{       //TODO:
    46         double value;
     46//      double value;
    4747        // log10(2)*log2(x) => log10(x)
    4848/*      __asm__ __volatile__ ( \
     
    5151        "fyl2x          #count st(0)*log2(st(1))->st(1); pop st(0)      \n\t" \
    5252        : "=t" (value) : "0"(num) );
    53 */      return value;
     53*/      return 1.0;
    5454       
    5555}
  • generic/include/func.h

    r5bb8e45 r5a95b25  
    3333#include <typedefs.h>
    3434
    35 extern __u32 haltstate;
     35extern volatile __u32 haltstate;
    3636
    3737extern void halt(void);
  • generic/include/panic.h

    r5bb8e45 r5a95b25  
    3636#endif
    3737
    38 extern void panic_printf(char *fmt, ...);
     38extern void panic_printf(char *fmt, ...) __attribute__((noreturn)) ;
    3939
    4040#endif
  • generic/src/debug/print.c

    r5bb8e45 r5a95b25  
    5656        char c;
    5757       
    58         while (c = str[i++])
     58        while ((c = str[i++]))
    5959                putchar(c);
    6060}
     
    291291        spinlock_lock(&printflock);
    292292
    293         while (c = fmt[i++]) {
     293        while ((c = fmt[i++])) {
    294294                switch (c) {
    295295
  • generic/src/lib/func.c

    r5bb8e45 r5a95b25  
    3535#include <console/kconsole.h>
    3636
    37 __u32   haltstate = 0; /**< Halt flag */
     37__u32 volatile haltstate = 0; /**< Halt flag */
    3838
    3939
  • generic/src/main/kinit.c

    r5bb8e45 r5a95b25  
    8585                 * Just a beautification.
    8686                 */
    87                 if (t = thread_create(kmp, NULL, TASK, 0)) {
     87                if ((t = thread_create(kmp, NULL, TASK, 0))) {
    8888                        spinlock_lock(&t->lock);
    8989                        t->flags |= X_WIRED;
     
    113113                for (i = 0; i < config.cpu_count; i++) {
    114114
    115                         if (t = thread_create(kcpulb, NULL, TASK, 0)) {
     115                        if ((t = thread_create(kcpulb, NULL, TASK, 0))) {
    116116                                spinlock_lock(&t->lock);                       
    117117                                t->flags |= X_WIRED;
     
    134134         * Create kernel console.
    135135         */
    136         if (t = thread_create(kconsole, "kconsole", TASK, 0))
     136        if ((t = thread_create(kconsole, "kconsole", TASK, 0)))
    137137                thread_ready(t);
    138138        else panic("thread_create/kconsole\n");
  • generic/src/mm/frame.c

    r5bb8e45 r5a95b25  
    410410        if (is_left) {
    411411                index = (FRAME_INDEX(zone, frame)) + (1 << frame->buddy_order);
    412         } else if (is_right) {
     412        } else { // if (is_right)
    413413                index = (FRAME_INDEX(zone, frame)) - (1 << frame->buddy_order);
    414414        }
  • generic/src/mm/heap.c

    r5bb8e45 r5a95b25  
    101101                y->next = NULL;
    102102               
    103                 if (z = x->next) {
     103                z = x->next;
     104                if (z) {
    104105                        z->prev = y;
    105106                        y->next = z;
  • generic/src/synch/waitq.c

    r5bb8e45 r5a95b25  
    7777grab_locks:
    7878        spinlock_lock(&t->lock);
    79         if (wq = t->sleep_queue) {              /* assignment */
     79        if ((wq = t->sleep_queue)) {            /* assignment */
    8080                if (!spinlock_trylock(&wq->lock)) {
    8181                        spinlock_unlock(&t->lock);
  • generic/src/time/clock.c

    r5bb8e45 r5a95b25  
    9393       
    9494                spinlock_lock(&THREAD->lock);
    95                 if (ticks = THREAD->ticks)
     95                if ((ticks = THREAD->ticks))
    9696                        THREAD->ticks--;
    9797                spinlock_unlock(&THREAD->lock);
Note: See TracChangeset for help on using the changeset viewer.