Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2018 12:08:09 +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: r474251 - head/x11-clocks/glclock/files
Message-ID:  <201807091208.w69C89e8079017@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Jul  9 12:08:09 2018
New Revision: 474251
URL: https://svnweb.freebsd.org/changeset/ports/474251

Log:
  x11-clocks/glclock: Fix build with Clang 6
  
  GLObject.cpp:843:22: error: non-constant-expression cannot be narrowed from type 'double' to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]
          GLfloat lamb[4] = { color[0] * 0.1, color[1] * 0.1, color[2] * 0.1, 1.0f } ;
                              ^~~~~~~~~~~~~~
  
  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p474051_s336054/logs/glclock-6.0.b6.0_6.log

Added:
  head/x11-clocks/glclock/files/patch-GLObject.cpp   (contents, props changed)

Added: head/x11-clocks/glclock/files/patch-GLObject.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-clocks/glclock/files/patch-GLObject.cpp	Mon Jul  9 12:08:09 2018	(r474251)
@@ -0,0 +1,15 @@
+GLObject.cpp:843:22: error: non-constant-expression cannot be narrowed from type 'double' to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]
+        GLfloat lamb[4] = { color[0] * 0.1, color[1] * 0.1, color[2] * 0.1, 1.0f } ;
+                                    ^~~~~~~~~~~~~~
+
+--- GLObject.cpp.orig	2018-07-09 11:47:42 UTC
++++ GLObject.cpp
+@@ -840,7 +840,7 @@ void SetDirectionalLight(GLenum light, GLfloat pos[4],
+ 						 GLfloat amb, GLfloat specularFlag, GLfloat bright, GLfloat *modulate)
+ {
+ 	GLfloat color[4] = { colorRGBA[0], colorRGBA[1], colorRGBA[2], 1.0f } ;	// colorRGBA[3] } ;
+-	GLfloat	lamb[4] = { color[0] * 0.1, color[1] * 0.1, color[2] * 0.1, 1.0f } ;
++	GLfloat	lamb[4] = { color[0] * 0.1f, color[1] * 0.1f, color[2] * 0.1f, 1.0f } ;
+ 	static GLfloat	u_pos[4] ;
+ 	static GLfloat	spec[4] = { 0.0f, 0.0f, 0.0f, 1.0f } ;
+ 



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