From owner-svn-ports-all@freebsd.org Wed Jul 4 10:37:45 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3609410273FE; Wed, 4 Jul 2018 10:37:45 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D83A2730A8; Wed, 4 Jul 2018 10:37:44 +0000 (UTC) (envelope-from adridg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B96EA1B4A; Wed, 4 Jul 2018 10:37:44 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w64AbiWt015845; Wed, 4 Jul 2018 10:37:44 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w64AbiA0015843; Wed, 4 Jul 2018 10:37:44 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <201807041037.w64AbiA0015843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Wed, 4 Jul 2018 10:37:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r473876 - head/www/srg/files X-SVN-Group: ports-head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: head/www/srg/files X-SVN-Commit-Revision: 473876 X-SVN-Commit-Repository: ports 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.27 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: Wed, 04 Jul 2018 10:37:45 -0000 Author: adridg Date: Wed Jul 4 10:37:44 2018 New Revision: 473876 URL: https://svnweb.freebsd.org/changeset/ports/473876 Log: www/srg Fix build with Clang6 output.cc:101:22: error: cannot initialize an array element of type 'char *' with an rvalue of type 'char' The patches explain the changes. In short, weird types and weird initializations, normal for 2013-ish. Reported by: linimon Added: head/www/srg/files/ head/www/srg/files/patch-include_UserReport.h (contents, props changed) head/www/srg/files/patch-src_output.cc (contents, props changed) Added: head/www/srg/files/patch-include_UserReport.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/srg/files/patch-include_UserReport.h Wed Jul 4 10:37:44 2018 (r473876) @@ -0,0 +1,13 @@ +Fix Clang6 warning, mismatched guard defines + +--- include/UserReport.h.orig 2018-07-04 10:30:57 UTC ++++ include/UserReport.h +@@ -26,7 +26,7 @@ + */ + + #ifndef USERREPORT_H +-#define USREREPORT_H ++#define USERREPORT_H + + #include "srg.h" + #include "Report.h" Added: head/www/srg/files/patch-src_output.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/srg/files/patch-src_output.cc Wed Jul 4 10:37:44 2018 (r473876) @@ -0,0 +1,36 @@ +Fix with Clang6: + + - Weird type for buffer for fread() + - Initialization of base through another buffer + +--- src/output.cc.orig 2018-07-04 10:31:59 UTC ++++ src/output.cc +@@ -98,7 +98,7 @@ void init_file(const char *filename) + + /* Copy data */ + while (!feof(source)) { +- char *buf[4096] = {'\0'}; ++ char buf[4096] = {'\0'}; + int c = fread((void *)&buf[0], 1, 4096, source); + fwrite((void *)&buf[0], 1, c, dest); + } +@@ -118,7 +118,8 @@ void html_header(FILE *outfile, const char *rootpath) + * file will reside in to the top level output directory. This string + * is only used if srg.outputURL is not set + */ +- char *base=""; ++ static char _base[]=""; ++ char *base=_base; + + if (strlen(srg.outputURL)==0 && strlen(rootpath)>0) { + base = strdup(rootpath); +@@ -173,7 +174,8 @@ void html_footer(FILE *outfile, const char *rootpath) + * file will reside in to the top level output directory. This string + * is only used if srg.outputURL is not set + */ +- char *base=""; ++ static char _base[] = ""; ++ char *base=_base; + + if (strlen(srg.outputURL)==0 && strlen(rootpath)>0) + base = strdup(rootpath);