Take a change from xlockmore 5.55 so xlockmore will build with llvm 6.0.0.

c++ -c  -DHAVE_CONFIG_H 
-DDEF_FILESEARCHPATH=\"/usr/X11R6/share/X11/app-defaults/%N%C%S:/usr/X11R6/share/X11/app-defaults/%N%S\"
 -I. -I.. -I../.. -I/usr/xenocara/app/xlockmore/xlock/ 
-I/usr/xenocara/app/xlockmore -I/usr/X11R6/include  -I/usr/X11R6/include 
-I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -O2 
-pipe  /usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:23: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                      ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:23: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                      ^~
                      static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:26: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                         ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:26: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                         ^~
                         static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:30: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                             ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:30: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                             ^~
                             static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:33: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:33: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                ^~
                                static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:37: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                    ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:37: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                    ^~
                                    static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:40: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                       ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:40: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                       ^~
                                       static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:44: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                           ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:44: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                           ^~
                                           static_cast<float>( )
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:47: error: 
non-constant-expression cannot be narrowed from type 'double' to 'float' in 
initializer list [-Wc++11-narrowing]
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                              ^~
/usr/xenocara/app/xlockmore/modes/glx/./i_spline.cc:93:47: note: insert an 
explicit cast to silence this issue
      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
                                              ^~
                                              static_cast<float>( )
8 errors generated.
*** Error 1 in app/xlockmore/obj/modes/glx (Makefile:146 './i_spline.o')
*** Error 1 in app/xlockmore/obj (Makefile:15 'all')
*** Error 1 in app/xlockmore (/usr/X11R6/share/mk/bsd.xorg.mk:145 'all')
*** Error 1 in app/xlockmore (/usr/X11R6/share/mk/bsd.xorg.mk:196 'build')
*** Error 1 in app (<bsd.subdir.mk>:48 'build')
*** Error 1 in . (<bsd.subdir.mk>:48 'realbuild')
*** Error 1 in . (Makefile:38 'do-build')
*** Error 1 in /usr/xenocara (Makefile:27 'build')

Index: modes/glx/i_spline.cc
===================================================================
RCS file: /cvs/xenocara/app/xlockmore/modes/glx/i_spline.cc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 i_spline.cc
--- modes/glx/i_spline.cc       26 Nov 2006 11:08:51 -0000      1.1.1.1
+++ modes/glx/i_spline.cc       15 Mar 2018 06:46:24 -0000
@@ -90,7 +90,10 @@ void printSpline(FILE *fp, TwoJetVec v00
     print_point(fp, v11, 1, 0, 0, 0, binary);
 
     if (binary) {
-      float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1};
+      float sts[8] = {(float) s0, (float) t0,
+               (float) s1, (float) t0,
+               (float) s0, (float) t1,
+               (float) s1, (float) t1};
       (void) fwrite(&sts, sizeof(float), 8, fp);
     } else {
       (void) fprintf(fp, "%g %g  %g %g  %g %g  %g %g\n\n",

Reply via email to