[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] a519d1: Fix PFD_STEREO test in Win32 open GL

GitHub noreply at github.com
Mon Jul 18 16:02:51 UTC 2016


  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: a519d1f445940fc7dcea78a72e38316254b147cb
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/a519d1f445940fc7dcea78a72e38316254b147cb
  Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
  Date:   2016-07-18 (Mon, 18 Jul 2016)

  Changed paths:
    M platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c

  Log Message:
  -----------
  Fix PFD_STEREO test in Win32 open GL

The clang compiler says it all (to be read with fixed size font):

../../platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c:416:22: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
      if(pfd.dwFlags & PFD_STEREO == 0)
               ^~~~~~~~~~~~~~~~~
../../platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c:416:22: note: place parentheses around the '==' expression to silence this warning
      if(pfd.dwFlags & PFD_STEREO == 0)
               ^ ~~~~~~~~~~~~~~~
../../platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c:416:22: note: place parentheses around the & expression to evaluate it first
      if(pfd.dwFlags & PFD_STEREO == 0)
   ~~~~~~~~~~~~^~~~~~~~~~~~

While at it, fix another warning:

../../platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c:449:21: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
  if((goodPFD.nSize == 0)) {
      ~~~~~~~~~~~~~~^~~~
../../platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c:449:21: note: remove extraneous parentheses around the comparison to silence this warning
  if((goodPFD.nSize == 0)) {
     ~              ^   ~
../../platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c:449:21: note: use '=' to turn this equality comparison into an assignment
  if((goodPFD.nSize == 0)) {
              ^~




More information about the Vm-dev mailing list