Ignore:
Timestamp:
Aug 26, 2018, 7:36:09 PM (6 years ago)
Author:
viala@…
Message:

[kernel_init] Fix a potentially not initalized variable.

I added an assert to catch the possiblity of an unknown functionnal device type.
kern/kernel_init.c:469:30: warning: 'entry' may be used uninitialized in this function [-Wmaybe-uninitialized]

xptr_t * entry;


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/kernel_init.c

    r492 r515  
    476476                    if((func==DEV_FUNC_NIC) && (rx==0)) entry  = &chdev_dir.nic_tx[channel];
    477477                    if((func==DEV_FUNC_NIC) && (rx==1)) entry  = &chdev_dir.nic_rx[channel];
     478                    else { assert( false, "Unknown functional device type."); }
    478479
    479480                    for( x = 0 ; x < info->x_size ; x++ )
Note: See TracChangeset for help on using the changeset viewer.