Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conversion warnings #6

Closed
nacho opened this issue Nov 27, 2013 · 4 comments
Closed

Fix conversion warnings #6

nacho opened this issue Nov 27, 2013 · 4 comments
Labels
Milestone

Comments

@nacho
Copy link

nacho commented Nov 27, 2013

several warnings are spotted by this compilation flag, i.e:

../../dcvtest/glew.cpp: In function ‘const GLubyte* glewGetErrorString(GLenum)’:
../../dcvtest/glew.cpp:13535:76: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
const int max_error = sizeof(_glewErrorString)/sizeof(_glewErrorString) - 1;
^
../../dcvtest/glew.cpp: In function ‘const GLubyte
glewGetString(GLenum)’:
../../dcvtest/glew.cpp:13549:67: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;

@nigels-com
Copy link
Owner

Can you mention which particular platform and/or compiler is emitting these?
I tried some gccs on Ubuntu 12.04, 13.04, 13.10...

  • Nigel

@nacho
Copy link
Author

nacho commented Jan 8, 2014

This is on fedora 20 using gcc (g++), see also that I am setting the -Wconversion flag

@nigels-com
Copy link
Owner

Confirming this on Fedora 20, building like so:
make CC=g++
And with -Wconversion applied.

@nigels-com
Copy link
Owner

I pushed a fix for this into the master branch, just now.

@nigels-com nigels-com modified the milestone: GLEW 2.0.0 Apr 3, 2016
chkob pushed a commit to chkob/glew that referenced this issue Feb 23, 2018
Add missing libraries on linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants