Bug 244645 - biology/jellyfish: Fix biology/jellyfish build with clang 10.0.0
Summary: biology/jellyfish: Fix biology/jellyfish build with clang 10.0.0
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: Jason W. Bacon
URL:
Keywords:
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-03-06 19:48 UTC by Dimitry Andric
Modified: 2020-03-07 19:26 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (jwb)


Attachments
Fix biology/jellyfish build with clang 10.0.0 (1.66 KB, patch)
2020-03-06 19:48 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2020-03-06 19:48:25 UTC
Created attachment 212207 [details]
Fix biology/jellyfish build with clang 10.0.0

As reported in bug 244251, with clang 10.0.0 the biology/jellyfish port runs into -Werror warnings:

lib/jsoncpp.cpp:2303:74: error: implicit conversion from 'const Json::Int64' (aka 'const long long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
      JSON_ASSERT_MESSAGE( value_.real_ >= minInt64  &&  value_.real_ <= maxInt64, "Real out of Int64 range" );
                                                                      ~~ ^~~~~~~~
lib/jsoncpp.cpp:1566:58: note: expanded from macro 'JSON_ASSERT_MESSAGE'
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) JSON_FAIL_MESSAGE( message )
                                                         ^~~~~~~~~
lib/jsoncpp.cpp:2331:67: error: implicit conversion from 'const Json::UInt64' (aka 'const unsigned long long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt64,  "Real out of UInt64 range" );
                                                               ~~ ^~~~~~~~~
lib/jsoncpp.cpp:1566:58: note: expanded from macro 'JSON_ASSERT_MESSAGE'
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) JSON_FAIL_MESSAGE( message )
                                                         ^~~~~~~~~

This can be fixed by adding explicit casts.
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-03-07 19:26:14 UTC
A commit references this bug:

Author: jwb
Date: Sat Mar  7 19:25:55 UTC 2020
New revision: 527971
URL: https://svnweb.freebsd.org/changeset/ports/527971

Log:
  biology/jellyfish: Patch for clang 10

  Add cast to silence implicit conversion error

  PR:             ports/244645
  Submitted by:   dim

Changes:
  head/biology/jellyfish/Makefile
  head/biology/jellyfish/files/patch-lib_jsoncpp.cpp
  head/biology/jellyfish/files/patch-sub__commands_count__main.cc
Comment 2 Jason W. Bacon freebsd_committer freebsd_triage 2020-03-07 19:26:59 UTC
Thanks!