RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.94k stars 1.99k forks source link

Warnings in native #147

Closed mehlis closed 11 years ago

mehlis commented 11 years ago
make[3]: Entering directory `/home/c/git/RIOT-OS/RIOT/cpu/native'
hwtimer_cpu.c:158:37: warning: passing 'void ()' to parameter of type 'void *' converts between void
      pointer and function pointer [-Wpedantic]
    if (register_interrupt(SIGALRM, hwtimer_isr_timer) != 0) {
                                    ^~~~~~~~~~~~~~~~~
/home/c/git/RIOT-OS/projects/ccn-lite/../../RIOT/cpu/native/include/cpu.h:55:39: note: passing argument
      to parameter 'handler' here
int register_interrupt(int sig, void *handler);
                                      ^
hwtimer_cpu.c:213:5: warning: void function 'hwtimer_arch_set_absolute' should not return void expression
      [-Wpedantic]
    return(hwtimer_arch_set(value, timer));
    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
irq_cpu.c:370:35: warning: assigning to 'void (*)(void)' from 'void *' converts between void pointer and
      function pointer [-Wpedantic]
    native_irq_handlers[sig].func = handler;
                                  ^ ~~~~~~~
irq_cpu.c:372:21: warning: assigning to 'void (*)(int, siginfo_t *, void *)' from 'void *' converts
      between void pointer and function pointer [-Wpedantic]
    sa.sa_sigaction = (void *) native_isr_entry;
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
irq_cpu.c:440:21: warning: assigning to 'void (*)(int, siginfo_t *, void *)' from 'void *' converts
      between void pointer and function pointer [-Wpedantic]
    sa.sa_sigaction = (void *) native_isr_entry;
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
startup.c:30:54: warning: unused parameter 'argc' [-Wunused-parameter]
__attribute__((constructor)) static void startup(int argc, char **argv)
                                                     ^
startup.c:30:67: warning: unused parameter 'argv' [-Wunused-parameter]
__attribute__((constructor)) static void startup(int argc, char **argv)
                                                                  ^
2 warnings generated.
mehlis commented 11 years ago
native-uart0.c:20:42: warning: unused parameter 'length' [-Wunused-parameter]
inline int uart0_puts(char *astring, int length)
                                         ^
1 warning generated.
LudwigKnuepfer commented 11 years ago

there are new warnings by now

LudwigKnuepfer commented 11 years ago

Fixed remaining warnings, close when #151 is merged.

mehlis commented 11 years ago

151 merged