u-boot-linaro source fails lint checks

Bug #903736 reported by Andrew Wafaa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
u-boot-linaro (Ubuntu)
Invalid
Low
John Rigby

Bug Description

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.

Revision history for this message
Andrew Wafaa (awafaa) wrote :

Sorry I forgot to add, I am trying to package u-boot-linaro-2011.11.2 on openSUSE 12.1 and 12.2

Changed in u-boot-linaro (Ubuntu):
assignee: nobody → John Rigby (jcrigby)
Revision history for this message
Andrew Wafaa (awafaa) wrote :

Looks like this issue only happens with the tarball release. A git checkout from http://git.linaro.org/git/boot/u-boot-linaro-stable.git builds without issue.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

That's weird, maybe something missing at the tarball.

We'll have a newer release in a few days, let's see if you're able to reproduce with the newer one, then we can work to see what is the issue.

Thanks.

John Rigby (jcrigby)
Changed in u-boot-linaro (Ubuntu):
importance: Undecided → Low
Revision history for this message
John Rigby (jcrigby) wrote :

u-boot-linaro tarball releases should be identical to git checkouts so if problem still exits please reopen this bug

Changed in u-boot-linaro (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.