From owner-svn-ports-head@freebsd.org Fri Feb 19 03:44:31 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A005EAAD319; Fri, 19 Feb 2016 03:44:31 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F4F11976; Fri, 19 Feb 2016 03:44:31 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1J3iUIl028159; Fri, 19 Feb 2016 03:44:30 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1J3iUv9028157; Fri, 19 Feb 2016 03:44:30 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201602190344.u1J3iUv9028157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Fri, 19 Feb 2016 03:44:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r409149 - in head/palm/palm-db-tools: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 03:44:31 -0000 Author: mi Date: Fri Feb 19 03:44:30 2016 New Revision: 409149 URL: https://svnweb.freebsd.org/changeset/ports/409149 Log: Add a patch removing dead code -- a bug in it triggers an error with clang38. PR: 207193 Added: head/palm/palm-db-tools/files/patch-field_argumentf (contents, props changed) Modified: head/palm/palm-db-tools/Makefile Modified: head/palm/palm-db-tools/Makefile ============================================================================== --- head/palm/palm-db-tools/Makefile Fri Feb 19 03:40:23 2016 (r409148) +++ head/palm/palm-db-tools/Makefile Fri Feb 19 03:44:30 2016 (r409149) @@ -3,6 +3,7 @@ PORTNAME= palm-db-tools DISTVERSION= 0_3_6 +PORTREVISION= 1 CATEGORIES= palm MASTER_SITES= SF Added: head/palm/palm-db-tools/files/patch-field_argumentf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/palm/palm-db-tools/files/patch-field_argumentf Fri Feb 19 03:44:30 2016 (r409149) @@ -0,0 +1,104 @@ +This patch removes a long-unused function because a bug in it triggers +an error in the modern compiler (clang-3.8). Instead of fixing the function, +we just remove it. + + -mi + +--- libflatfile/Database.h 2003-06-19 19:37:46.000000000 -0400 ++++ libflatfile/Database.h 2016-02-18 22:35:32.329328000 -0500 +@@ -112,12 +112,4 @@ + virtual FType field(int i) const; + +- /** +- * write the format of the field's argument in format, +- * and return a strings' vector with name of each argument part. +- * the format use the same display as used by printf +- */ +- virtual std::vector field_argumentf(int i, std::string& format) +- { format = std::string(""); return std::vector(0, std::string(""));} +- + /** + * Add a field to the flat-file database. An exception +--- libflatfile/DB.h 2003-06-19 19:37:46.000000000 -0400 ++++ libflatfile/DB.h 2016-02-18 22:35:10.046799000 -0500 +@@ -72,11 +72,4 @@ + + /** +- * write the format of the field's argument in format, +- * and return a strings' vector with name of each argument part. +- * the format use the same display as used by printf +- */ +- virtual std::vector field_argumentf(int i, std::string& format); +- +- /** + * Return the maximum number of views supported by this + * type of flat-file database. +--- libflatfile/DB.cpp 2003-06-19 19:37:46.000000000 -0400 ++++ libflatfile/DB.cpp 2016-02-18 22:35:55.362853000 -0500 +@@ -1291,66 +1293,4 @@ + } + +-std::vector +-PalmLib::FlatFile::DB::field_argumentf(int i, std::string& format) +-{ +- std::vector vtitles(0, std::string("")); +- int j; +- +- switch (field_type(i)) { +- case PalmLib::FlatFile::Field::STRING: +- format = std::string("%s"); +- vtitles.push_back(std::string("default value")); +- break; +- case PalmLib::FlatFile::Field::INTEGER: +- format = std::string("%ld/%d"); +- vtitles.push_back(std::string("default value")); +- vtitles.push_back(std::string("increment")); +- break; +- case PalmLib::FlatFile::Field::FLOAT: +- format = std::string("%f"); +- vtitles.push_back(std::string("default value")); +- break; +- case PalmLib::FlatFile::Field::DATE: +- format = std::string("%d/%d/%d"); +- vtitles.push_back(std::string("Year (or now)")); +- vtitles.push_back(std::string("Month")); +- vtitles.push_back(std::string("Day in the month")); +- break; +- case PalmLib::FlatFile::Field::TIME: +- format = std::string("%d/%d"); +- vtitles.push_back(std::string("Hour (or now)")); +- vtitles.push_back(std::string("Minute")); +- break; +- case PalmLib::FlatFile::Field::LIST: +- format = std::string(""); +- for (j = 0; j < 31; i++) { +- format += std::string("%s/"); +- std::ostringstream title; +- title << "item " << j; +- vtitles.push_back(title.str()); +- } +- format += std::string("%s"); +- vtitles.push_back(std::string("item 32")); +- break; +- case PalmLib::FlatFile::Field::LINK: +- format = std::string("%s/%d"); +- vtitles.push_back(std::string("database")); +- vtitles.push_back(std::string("field number")); +- break; +- case PalmLib::FlatFile::Field::LINKED: +- format = std::string("%d/%d"); +- vtitles.push_back(std::string("link field number")); +- vtitles.push_back(std::string("field number")); +- break; +- case PalmLib::FlatFile::Field::CALCULATED: +- case PalmLib::FlatFile::Field::BOOLEAN: +- case PalmLib::FlatFile::Field::NOTE: +- default: +- format = std::string(""); +- break; +- } +- return vtitles; +-} +- + unsigned PalmLib::FlatFile::DB::getMaxNumOfListViews() const + {