From owner-svn-ports-all@freebsd.org Sat Jan 6 05:24:10 2018 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 B26FEEBC0D4; Sat, 6 Jan 2018 05:24:10 +0000 (UTC) (envelope-from jbeich@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 74EE674D0E; Sat, 6 Jan 2018 05:24:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5C6BB2D2; Sat, 6 Jan 2018 05:24:09 +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 w065O901099262; Sat, 6 Jan 2018 05:24:09 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w065O9FQ099261; Sat, 6 Jan 2018 05:24:09 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801060524.w065O9FQ099261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sat, 6 Jan 2018 05:24:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458212 - head/math/py-matplotlib/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/math/py-matplotlib/files X-SVN-Commit-Revision: 458212 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.25 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: Sat, 06 Jan 2018 05:24:10 -0000 Author: jbeich Date: Sat Jan 6 05:24:09 2018 New Revision: 458212 URL: https://svnweb.freebsd.org/changeset/ports/458212 Log: math/py-matplotlib: unbreak build with Clang 6 (C++14 by default) extern/ttconv/pprdrv_tt.cpp:245:41: error: cast from pointer to smaller type 'char' loses information font->Copyright[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:261:42: error: cast from pointer to smaller type 'char' loses information font->FamilyName[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:277:37: error: cast from pointer to smaller type 'char' loses information font->Style[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:293:40: error: cast from pointer to smaller type 'char' loses information font->FullName[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:309:39: error: cast from pointer to smaller type 'char' loses information font->Version[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:325:40: error: cast from pointer to smaller type 'char' loses information font->PostName[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:340:42: error: cast from pointer to smaller type 'char' loses information font->PostName[length/2]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:355:41: error: cast from pointer to smaller type 'char' loses information font->Trademark[length]=(char)NULL; ^~~~~~~~~~ extern/ttconv/pprdrv_tt.cpp:1041:19: error: cast from pointer to smaller type 'char' loses information temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ ^~~~~~~~~~ Reported by: antoine (via bug 224669) Added: head/math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp (contents, props changed) Added: head/math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/py-matplotlib/files/patch-extern_ttconv_pprdrv__tt.cpp Sat Jan 6 05:24:09 2018 (r458212) @@ -0,0 +1,111 @@ +extern/ttconv/pprdrv_tt.cpp:245:41: error: cast from pointer to smaller type 'char' loses information + font->Copyright[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:261:42: error: cast from pointer to smaller type 'char' loses information + font->FamilyName[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:277:37: error: cast from pointer to smaller type 'char' loses information + font->Style[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:293:40: error: cast from pointer to smaller type 'char' loses information + font->FullName[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:309:39: error: cast from pointer to smaller type 'char' loses information + font->Version[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:325:40: error: cast from pointer to smaller type 'char' loses information + font->PostName[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:340:42: error: cast from pointer to smaller type 'char' loses information + font->PostName[length/2]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:355:41: error: cast from pointer to smaller type 'char' loses information + font->Trademark[length]=(char)NULL; + ^~~~~~~~~~ +extern/ttconv/pprdrv_tt.cpp:1041:19: error: cast from pointer to smaller type 'char' loses information + temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ + ^~~~~~~~~~ + +--- extern/ttconv/pprdrv_tt.cpp.orig 2016-09-09 02:50:50 UTC ++++ extern/ttconv/pprdrv_tt.cpp +@@ -242,7 +242,7 @@ void Read_name(struct TTFONT *font) + { + font->Copyright = (char*)calloc(sizeof(char),length+1); + strncpy(font->Copyright,(const char*)strings+offset,length); +- font->Copyright[length]=(char)NULL; ++ font->Copyright[length]='\0'; + replace_newlines_with_spaces(font->Copyright); + + #ifdef DEBUG_TRUETYPE +@@ -258,7 +258,7 @@ void Read_name(struct TTFONT *font) + free(font->FamilyName); + font->FamilyName = (char*)calloc(sizeof(char),length+1); + strncpy(font->FamilyName,(const char*)strings+offset,length); +- font->FamilyName[length]=(char)NULL; ++ font->FamilyName[length]='\0'; + replace_newlines_with_spaces(font->FamilyName); + + #ifdef DEBUG_TRUETYPE +@@ -274,7 +274,7 @@ void Read_name(struct TTFONT *font) + free(font->Style); + font->Style = (char*)calloc(sizeof(char),length+1); + strncpy(font->Style,(const char*)strings+offset,length); +- font->Style[length]=(char)NULL; ++ font->Style[length]='\0'; + replace_newlines_with_spaces(font->Style); + + #ifdef DEBUG_TRUETYPE +@@ -290,7 +290,7 @@ void Read_name(struct TTFONT *font) + free(font->FullName); + font->FullName = (char*)calloc(sizeof(char),length+1); + strncpy(font->FullName,(const char*)strings+offset,length); +- font->FullName[length]=(char)NULL; ++ font->FullName[length]='\0'; + replace_newlines_with_spaces(font->FullName); + + #ifdef DEBUG_TRUETYPE +@@ -306,7 +306,7 @@ void Read_name(struct TTFONT *font) + free(font->Version); + font->Version = (char*)calloc(sizeof(char),length+1); + strncpy(font->Version,(const char*)strings+offset,length); +- font->Version[length]=(char)NULL; ++ font->Version[length]='\0'; + replace_newlines_with_spaces(font->Version); + + #ifdef DEBUG_TRUETYPE +@@ -322,7 +322,7 @@ void Read_name(struct TTFONT *font) + free(font->PostName); + font->PostName = (char*)calloc(sizeof(char),length+1); + strncpy(font->PostName,(const char*)strings+offset,length); +- font->PostName[length]=(char)NULL; ++ font->PostName[length]='\0'; + replace_newlines_with_spaces(font->PostName); + + #ifdef DEBUG_TRUETYPE +@@ -337,7 +337,7 @@ void Read_name(struct TTFONT *font) + free(font->PostName); + font->PostName = (char*)calloc(sizeof(char),length+1); + utf16be_to_ascii(font->PostName, (char *)strings+offset, length); +- font->PostName[length/2]=(char)NULL; ++ font->PostName[length/2]='\0'; + replace_newlines_with_spaces(font->PostName); + + #ifdef DEBUG_TRUETYPE +@@ -352,7 +352,7 @@ void Read_name(struct TTFONT *font) + { + font->Trademark = (char*)calloc(sizeof(char),length+1); + strncpy(font->Trademark,(const char*)strings+offset,length); +- font->Trademark[length]=(char)NULL; ++ font->Trademark[length]='\0'; + replace_newlines_with_spaces(font->Trademark); + + #ifdef DEBUG_TRUETYPE +@@ -1038,7 +1038,7 @@ const char *ttfont_CharStrings_getname(struct TTFONT * + } + + strncpy(temp,ptr,len); /* Copy the pascal string into */ +- temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ ++ temp[len]='\0'; /* a buffer and make it ASCIIz. */ + + return temp; + }