#144 data argument not used by format string warnings in layer1/CGO.c

v1.7.0.0
closed-fixed
Thomas Holder
None
5
2014-09-25
2013-12-19
Jack Howarth
No

Current pymol svn at r4055 produces the warnings...

gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -fwrapv -O3 -Wall -Wstrict-prototypes -I/sw/include -D_PYMOL_VMD_PLUGINS -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -D_PYMOL_INLINE -D_PYMOL_OPENGL_SHADERS -DNO_MMLIBS -D_PYMOL_CGO_DRAWARRAYS -D_PYMOL_CGO_DRAWBUFFERS -D_CGO_DRAWARRAYS -D_PYMOL_GL_CALLLISTS -DOPENGL_ES_2 -D_PYMOL_NUMPY -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Imodules/cealign/src -Imodules/cealign/src/tnt -Ibuild/generated -Icontrib/uiuc/plugins/include -Icontrib/uiuc/plugins/molfile_plugin/src -I/sw/lib/python2.7/site-packages/numpy/core/include -I/sw/include -I/sw/include/freetype2 -I/usr/include -I/usr/X11/include -I/usr/X11/include/freetype2 -I/sw/include/python2.7 -c layer1/CGO.c -o build/temp.macosx-10.9-x86_64-2.7/layer1/CGO.o -ffast-math -funroll-loops -O3 -fcommon
layer1/CGO.c:6634:3: warning: data argument not used by format string [-Wformat-extra-args]
  CHECK_GL_ERROR_OK("beginning of CGO_gl_draw_buffers_indexed\n");
  ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:51:49: note: expanded from macro 'CHECK_GL_ERROR_OK'
     PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G);           \
                                                ^
layer1/CGO.c:6760:3: warning: data argument not used by format string [-Wformat-extra-args]
  CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: before glDrawElements\n");
  ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:51:49: note: expanded from macro 'CHECK_GL_ERROR_OK'
     PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G);           \
                                                ^
layer1/CGO.c:6762:3: warning: data argument not used by format string [-Wformat-extra-args]
  CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: after glDrawElements\n");
  ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:51:49: note: expanded from macro 'CHECK_GL_ERROR_OK'
     PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G);           \
                                                ^
layer1/CGO.c:6807:1: warning: data argument not used by format string [-Wformat-extra-args]
CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: end\n");
^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:51:49: note: expanded from macro 'CHECK_GL_ERROR_OK'
     PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G);           \
                                                ^
4 warnings generated.

under clang 5.0. These warnings can be eliminated with the following fix...

--- pymol-1.6.9/layer1/CGO.c.orig   2013-12-19 14:54:11.000000000 -0500
+++ pymol-1.6.9/layer1/CGO.c    2013-12-19 15:07:09.000000000 -0500
@@ -6631,7 +6631,7 @@
   CShaderPrg * shaderPrg;
   int attr_a_Vertex, attr_a_Normal, attr_a_Color, attr_a_Accessibility;
   GLenum err ;
-  CHECK_GL_ERROR_OK("beginning of CGO_gl_draw_buffers_indexed\n");
+  CHECK_GL_ERROR_OK("beginning of CGO_gl_draw_buffers_indexed returns err=%d\n");
   if (I->enable_shaders){
     shaderPrg = CShaderPrg_Enable_DefaultShader(I->G);
   } else {
@@ -6757,9 +6757,9 @@
     mode = CGOConvertDebugMode(I->debug, mode);
   }

-  CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: before glDrawElements\n");
+  CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: before glDrawElements returns err=%d\n");
   glDrawElements(mode, nindices, GL_C_INT_ENUM, 0);
-  CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: after glDrawElements\n");
+  CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: after glDrawElements returns err=%d\n");

 #ifdef OPENGL_ES_2
   if (I->use_shader){
@@ -6804,7 +6804,7 @@
     CShaderPrg_Disable(shaderPrg);
   }
 #endif
-CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: end\n");
+CHECK_GL_ERROR_OK("CGO_gl_draw_buffers_indexed: end returns err=%d\n");
 }

 static void CGO_gl_draw_buffers_not_indexed(CCGORenderer * I, float **pc){

Discussion

  • Thomas Holder
    Thomas Holder
    2013-12-19

    • status: open --> closed-fixed
    • assigned_to: Thomas Holder
    • Group: v1.6.2.0 --> v1.7.0.0