When packaging u-boot-linaro on openSUSE we run into the following lint errors:
I: Program is using implicit definitions of special functions.
these functions need to use their correct prototypes to allow
the lightweight buffer overflow checking to work.
- Implicit memory/string functions need #include <string.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *read* functions need #include <unistd.h>.
- Implicit *recv* functions need #include <sys/socket.h>.
W: u-boot-omap4panda implicit-fortify-decl ehci-panda.c:24
I: File is compiled without RPM_OPT_FLAGS
W: u-boot-omap4panda no-rpm-opt-flags <cmdline>:gen_eth_addr.c, img2srec.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/crc32.c, default_image.c, fit_image.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/common/image.c, imximage.c, kwbimage.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/md5.c, mkimage.c, os_support.c, omapimage.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/sha1.c, ublimage.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/libfdt/fdt.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/libfdt/fdt_ro.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/libfdt/fdt_rw.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/libfdt/fdt_strerror.c, /home/abuild/rpmbuild/BUILD/u-boot-linaro-2011.11.2/lib/libfdt/fdt_wip.c, hello_world.c, stubs.c, cache_v7.c, cpu.c, syslib.c, timer.c, utils.c, gpio.c, board.c, clocks.c, emif.c, sdram_elpida.c, mem.c, sys_info.c, bootm.c, cache.c, cache-cp15.c, cache-pl310.c, interrupts.c, reset.c, eabi_compat.c, cmd_bdinfo.c, cmd_boot.c, cmd_bootm.c, cmd_console.c, cmd_echo.c, cmd_exit.c, cmd_ext2.c, cmd_fat.c, cmd_fdt.c, cmd_help.c, cmd_i2c.c, cmd_itest.c, cmd_load.c, cmd_mem.c, cmd_misc.c, cmd_mmc.c, cmd_net.c, cmd_nvedit.c, cmd_pcmcia.c, cmd_pxe.c, cmd_source.c, cmd_test.c, cmd_usb.c, cmd_version.c, cmd_ximg.c, command.c, dlmalloc.c, env_common.c, env_nowhere.c, exports.c, fdt_support.c, flash.c, hush.c, main.c, memsize.c, menu.c, s_record.c, stdio.c, usb_storage.c, xyzModem.c, part.c, part_dos.c, omap24xx_i2c.c, omap_hsmmc.c, rpx_pcmcia.c, tqm8xx_pcmcia.c, twl6030.c, date.c, ns16550.c, serial.c, usbtty.c, usb_ether.c, smsc95xx.c, core.c, ep0.c, ehci-hcd.c, ehci-omap4.c, musb_udc.c, musb_core.c, omap3.c, ext2fs.c, dev.c, file.c, fdt_sw.c, circbuf.c, crc7.c, crc16.c, display_options.c, errno.c, gunzip.c, hashtable.c, lmb.c, ldiv.c, net_utils.c, qsort.c, strmhz.c, ctype.c, div64.c, string.c, time.c, uuid.c, vsprintf.c, zlib.c, bootp.c, eth.c, tftp.c, ehci-panda.c, spl.c
I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
W: u-boot-omap4panda strict-aliasing-punning smsc95xx.c:380
E: u-boot-omap4panda 64bit-portability-issue panda.c:97, 99, 101, 103, 105
I: Program returns random data in a function
E: u-boot-omap4panda no-return-in-nonvoid-function ehci-panda.c:59
E: u-boot-omap4panda no-return-in-nonvoid-function omap_hsmmc.c:56
I: Program returns random data in a function
E: u-boot-omap4panda no-return-in-nonvoid-function ehci-panda.c:59
E: u-boot-omap4panda no-return-in-nonvoid-function omap_hsmmc.c:56
It looks like the first set of errors (E: u-boot-omap4panda 64bit-portability-issue panda.c:97, 99, 101, 103, 105) are probably casting issues, so it's probably enough to manually cast some pointers.
The next set of errors ( E: u-boot-omap4panda no-return-in-nonvoid-function ehci-panda.c:59 onwards) apparently have a "return" statement without argument in a function that returns a value. So some value needs to be returned there.
I'm not a programmer, and have only understood these issue after speaking to more knowledgeable colleagues, I'm happy to create/test patches etc if someone could advise on what the pointers and values need to be.
Sorry I forgot to add, I am trying to package u-boot- linaro- 2011.11. 2 on openSUSE 12.1 and 12.2