synapticon / Etherlab_EtherCAT_Master

Clone of IgH EtherCAT Master with additional Vectioneer patches.
GNU Lesser General Public License v2.1
81 stars 54 forks source link

devices/generic.c warning: ISO C90 forbids mixed declarations and code #1

Closed koppi closed 8 years ago

koppi commented 8 years ago

Please note: this code produces the following warning at compile time:

devices/generic.c: In function ‘ec_gen_device_create_socket’:
devices/generic.c:218:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaratio
n-after-statement]
     struct net *nd_net = dev_net(dev->netdev);
     ^
koppi commented 8 years ago

Please add an extra declaration statement:

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) 
    struct net *nd_net;
#endif
fjes commented 8 years ago

Thanks for the feedback, you are right about these issues and we will fix them asap.

fjes commented 8 years ago

Fixed with 5c588dc2142a49c23a9d80786804b2c5cf16c928