svn commit: r426630 - in head/devel/kore: . files
Jan Beich
jbeich at FreeBSD.org
Sun Nov 20 20:58:39 UTC 2016
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 <t at tobik.me> (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 at 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;
More information about the svn-ports-all
mailing list