On Thu, Feb 07, 2013 at 10:50:54PM +0100, Alexander Aring wrote: > Hi, > > On Thu, Feb 07, 2013 at 10:41:56PM +0100, Sascha Hauer wrote: > > On Thu, Feb 07, 2013 at 10:35:24PM +0100, Sascha Hauer wrote: > > > On Thu, Feb 07, 2013 at 09:36:16PM +0100, Alexander Aring wrote: > > > > First I tried to change getopt optstring argument to "const char *" > > > > and I test it with an allyesconfig for compiler warnings. > > > > > > > > Then there popup some compile errors, which I tried to fix. > > > > > > > > I am not happy with some of these solutions. Maybe someone have an idea > > > > how we can make it better. > > > > > > > > hush: add getopt only if it enabled > > > > - I don't know if this needs a fix. But if we disable getopt there is a > > > > no-op getopt implementation in the command list. This patch don't add > > > > getopt to the command list at runtime, but the no-op implementation is > > > > still there. Maybe a compiletime solution is better to remove the > > > > no-op implementation. > > > > > > I don't understand. getopt is not there if CONFIG_HUSH_GETOPT is > > > disabled. It's ifdeffed out. > > > > Ah, now I got it. You miss the 'unknown command... message'. Then the > > patch seems fine. > > > > Yea, it's only a small thing... I don't know if this is necessary. :-) > Maybe there is a special reason for that no error occurs. Well the patch will result in dropping the unnecessary strcmp, so a slightly smaller binary. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox