Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Aug 2018 01:24:40 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r477989 - head/emulators/quasi88/files
Message-ID:  <201808250124.w7P1Oesf033479@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sat Aug 25 01:24:40 2018
New Revision: 477989
URL: https://svnweb.freebsd.org/changeset/ports/477989

Log:
  emulators/quasi88: Fix build with Clang 6
  
  src/fmgen/psg.cpp:121:37: error: constant expression evaluates to -1 which cannot be narrowed to type 'uint8' (aka 'unsigned char') [-Wc++11-narrowing]
          static uint8 table3[4] = {  0,  1, -1,  0 };
                                             ^~
  
  http://beefy11.nyi.freebsd.org/data/head-i386-default/p477468_s337991/logs/quasi88-0.6.4.log
  
  PR:		230869
  Submitted by:	1wkmmr@gmail.com

Added:
  head/emulators/quasi88/files/
  head/emulators/quasi88/files/patch-src_fmgen_psg.cpp   (contents, props changed)

Added: head/emulators/quasi88/files/patch-src_fmgen_psg.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/quasi88/files/patch-src_fmgen_psg.cpp	Sat Aug 25 01:24:40 2018	(r477989)
@@ -0,0 +1,15 @@
+src/fmgen/psg.cpp:121:37: error: constant expression evaluates to -1 which cannot be narrowed to type 'uint8' (aka 'unsigned char') [-Wc++11-narrowing]
+        static uint8 table3[4] = {  0,  1, -1,  0 };
+                                           ^~
+
+--- src/fmgen/psg.cpp.orig	2003-09-05 15:06:43 UTC
++++ src/fmgen/psg.cpp
+@@ -118,7 +118,7 @@ void PSG::MakeEnvelopTable()
+ 		2,2, 2,0, 2,1, 2,3, 1,1, 1,3, 1,2, 1,0,
+ 	};
+ 	static uint8 table2[4] = {  0,  0, 31, 31 };
+-	static uint8 table3[4] = {  0,  1, -1,  0 };
++	static uint8 table3[4] = {  0,  1, 255,  0 };
+ 
+ 	uint* ptr = enveloptable[0];
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808250124.w7P1Oesf033479>