On Tue, Sep 08, 2020 at 07:07:37PM +0200, Frederic Cambus wrote:
> On Tue, Sep 08, 2020 at 11:43:04AM -0400, Kurt Mosiejczuk wrote:
> > The build of www/kore dies on sparc64 because of -Werror.
> > 
> > Modifying the patch for Makefile removes that and fixes the build.
> > 
> > ok?
> 
> Could you please share the log showing the warnings?
> 

Just this:

cc1: warnings being treated as errors
src/json.c: In function 'json_get_string':
src/json.c:783: warning: comparison is always true due to limited range of data 
type

ch is an u_int8_t, so 'ch >= 0' is always true.

Index: Makefile
===================================================================
RCS file: /var/cvs/ports/www/kore/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile    1 Sep 2020 16:50:50 -0000       1.20
+++ Makefile    8 Sep 2020 17:17:03 -0000
@@ -3,6 +3,7 @@
 COMMENT =      web application framework for writing scalable web APIs in C
 
 DISTNAME =     kore-4.0.0
+REVISION =     0
 
 CATEGORIES =   www
 
Index: patches/patch-src_json_c
===================================================================
RCS file: patches/patch-src_json_c
diff -N patches/patch-src_json_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_json_c    8 Sep 2020 17:16:35 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/json.c
+--- src/json.c.orig
++++ src/json.c
+@@ -780,7 +780,7 @@ json_get_string(struct kore_json *json)
+               if (ch == '"')
+                       break;
+ 
+-              if (ch >= 0 && ch <= 0x1f)
++              if (ch <= 0x1f)
+                       goto cleanup;
+ 
+               if (ch == '\\') {

Reply via email to