Bug 196460 - Fix sysutils/flashrom compilation with latest clang version
Summary: Fix sysutils/flashrom compilation with latest clang version
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-03 11:22 UTC by olivier
Modified: 2015-02-20 16:49 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (nukama+maintainer)


Attachments
patch file for flashrom with latest release of clang (2.00 KB, patch)
2015-01-03 11:22 UTC, olivier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2015-01-03 11:22:40 UTC
Created attachment 151261 [details]
patch file for flashrom with latest release of clang

sysutils/flashrom compilation failed with latest clang on these errors:

flashrom.c:1741:6: error: comparison of array 'flashchips' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
        if (flashchips == NULL || flashchips[0].vendor == NULL) {
            ^~~~~~~~~~    ~~~~
flashrom.c:1750:6: error: comparison of array 'chipset_enables' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
        if (chipset_enables == NULL) {
            ^~~~~~~~~~~~~~~    ~~~~
flashrom.c:1754:6: error: comparison of array 'board_matches' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
        if (board_matches == NULL) {
            ^~~~~~~~~~~~~    ~~~~
flashrom.c:1758:6: error: comparison of array 'boards_known' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
        if (boards_known == NULL) {
            ^~~~~~~~~~~~    ~~~~
flashrom.c:1762:6: error: comparison of array 'laptops_known' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
        if (laptops_known == NULL) {
            ^~~~~~~~~~~~~    ~~~~
5 errors generated.
Makefile:656: recipe for target 'flashrom.o' failed


I've applied the patch found here for fixing this error:
https://code.google.com/p/chromium/issues/detail?id=347749
Comment 1 Bugzilla Automation freebsd_committer 2015-01-03 11:22:40 UTC
Maintainer CC'd
Comment 2 nukama 2015-01-04 14:32:02 UTC
Fixed correctly in upstream >= r1799.

https://code.coreboot.org/p/flashrom/source/commit/1799/

Either apply a patch based on 1799 and test it, 
or wait for the next release in a few weeks (-> closed).
Comment 3 commit-hook freebsd_committer 2015-02-20 16:48:15 UTC
A commit references this bug:

Author: arved
Date: Fri Feb 20 16:47:30 UTC 2015
New revision: 379447
URL: https://svnweb.freebsd.org/changeset/ports/379447

Log:
  Remove Werror to allow compilation with latest clang

  PR:		196460

Changes:
  head/sysutils/flashrom/Makefile
Comment 4 Tilman Keskinoz freebsd_committer 2015-02-20 16:49:20 UTC
The upstream patch looks fairly intrusive so i just disabled Werror for now.

Thanks for reporting and getting this fixed upstream.