From owner-svn-ports-all@freebsd.org Sun Nov 20 20:58:39 2016 Return-Path: Delivered-To: svn-ports-all@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 2D4EEC4C6D4; Sun, 20 Nov 2016 20:58:39 +0000 (UTC) (envelope-from jbeich@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 F27C51BA3; Sun, 20 Nov 2016 20:58:38 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKKwcoQ065246; Sun, 20 Nov 2016 20:58:38 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKKwbXc065243; Sun, 20 Nov 2016 20:58:37 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201611202058.uAKKwbXc065243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 20 Nov 2016 20:58:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r426630 - in head/devel/kore: . 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 20:58:39 -0000 Author: jbeich Date: Sun Nov 20 20:58:37 2016 New Revision: 426630 URL: https://svnweb.freebsd.org/changeset/ports/426630 Log: devel/kore: unbreak build with clang 3.9 src/pgsql.c:222:17: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] va_start(args, count); ^ src/pgsql.c:217:45: note: parameter of type 'u_int8_t' (aka 'unsigned char') is declared here const char *query, int result, u_int8_t count, ...) ^ PR: 214639 Reported by: antoine (via exp-run) Submitted by: Tobias Kortkamp (maintainer) Obtained from: upstream Added: head/devel/kore/files/patch-includes_pgsql.h (contents, props changed) Modified: head/devel/kore/Makefile (contents, props changed) head/devel/kore/files/patch-src_pgsql.c (contents, props changed) Modified: head/devel/kore/Makefile ============================================================================== --- head/devel/kore/Makefile Sun Nov 20 20:58:21 2016 (r426629) +++ head/devel/kore/Makefile Sun Nov 20 20:58:37 2016 (r426630) @@ -4,6 +4,7 @@ PORTNAME= kore PORTVERSION= 2.0.0 DISTVERSIONSUFFIX= -release +PORTREVISION= 1 CATEGORIES= devel www MAINTAINER= t@tobik.me Added: head/devel/kore/files/patch-includes_pgsql.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/kore/files/patch-includes_pgsql.h Sun Nov 20 20:58:37 2016 (r426630) @@ -0,0 +1,14 @@ +--- includes/pgsql.h.orig 2016-08-01 07:59:32 UTC ++++ includes/pgsql.h +@@ -66,9 +66,9 @@ void kore_pgsql_cleanup(struct kore_pgsq + void kore_pgsql_continue(struct http_request *, struct kore_pgsql *); + int kore_pgsql_query(struct kore_pgsql *, const char *); + int kore_pgsql_query_params(struct kore_pgsql *, +- const char *, int, u_int8_t, ...); ++ const char *, int, int, ...); + int kore_pgsql_v_query_params(struct kore_pgsql *, +- const char *, int, u_int8_t, va_list); ++ const char *, int, int, va_list); + int kore_pgsql_register(const char *, const char *); + int kore_pgsql_ntuples(struct kore_pgsql *); + void kore_pgsql_logerror(struct kore_pgsql *); Modified: head/devel/kore/files/patch-src_pgsql.c ============================================================================== --- head/devel/kore/files/patch-src_pgsql.c Sun Nov 20 20:58:21 2016 (r426629) +++ head/devel/kore/files/patch-src_pgsql.c Sun Nov 20 20:58:37 2016 (r426630) @@ -1,4 +1,6 @@ -Backport of https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf +Backports of + +https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf so compiling on FreeBSD 10.x/i386 succeeds. Without it the build will fail with: src/pgsql.c:222:6: error: variable 'args' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] @@ -16,9 +18,34 @@ src/pgsql.c:220:15: note: initialize the = NULL 1 error generated. +and https://github.com/jorisvink/kore/commit/7eced6f035c83c02680d9b58371851f8662a0e8a +so that compiling with Clang 3.9 succeeds. Without it the build will fail with: + +src/pgsql.c:222:17: error: passing an object that undergoes default argument promotion to 'va_start' + has undefined behavior [-Werror,-Wvarargs] + va_start(args, count); + ^ +src/pgsql.c:217:45: note: parameter of type 'u_int8_t' (aka 'unsigned char') is declared here + const char *query, int result, u_int8_t count, ...) + --- src/pgsql.c.orig 2016-08-01 07:59:32 UTC +++ src/pgsql.c -@@ -219,13 +219,11 @@ kore_pgsql_query_params(struct kore_pgsq +@@ -151,7 +151,7 @@ kore_pgsql_query(struct kore_pgsql *pgsq + + int + kore_pgsql_v_query_params(struct kore_pgsql *pgsql, +- const char *query, int result, u_int8_t count, va_list args) ++ const char *query, int result, int count, va_list args) + { + u_int8_t i; + char **values; +@@ -214,18 +214,16 @@ cleanup: + + int + kore_pgsql_query_params(struct kore_pgsql *pgsql, +- const char *query, int result, u_int8_t count, ...) ++ const char *query, int result, int count, ...) + { int ret; va_list args;