<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Hello,</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>I'm currently working on i386 pc386 BSP. This problem concerns the 3c509/3c509.c file.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>After turning rtems_3c509_driver_attach() from global to static, since it's not
 being used anywhere outside in the tree, I get this warning for unused function. Ideally I should delete it. If I delete it, then I end up deleting all other functions also. But this rtems_3c509_driver_attach() stores references to different handlers & calls them by passing a ifnet structure to if_attach(). I think it's a very important method & I don't think I should delete it.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>But this function </span><span style="font-size: 10pt;">rtems_3c509_driver_attach() is neither called locally , nor globally.</span></div><div style="color: rgb(0, 0, 0); font-size: 10pt; font-family: arial, helvetica, sans-serif;
 background-color: transparent; font-style: normal;"><span style="font-size: 10pt;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 10pt;">If I were to treat it as global function, I think it should be declared in a header file, because declaring a global function locally seems bad.</span></div><div style="color: rgb(0, 0, 0); font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 10pt;">If I were to treat it as static, then I get this warning of unused function during compilation. How should I proceed ?</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
 arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;">Regards</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="color: rgb(0, 0, 0); font-size: 12.727272033691406px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div></div></body></html>