Re: wined3d: Document the correlation of gl_shaders and num_gl_shaders with an assertion (Coverity 905).
2009/3/22 James Hawkins <truiken(a)gmail.com>:
--- dlls/wined3d/vertexshader.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
I guess the nicer way to make Coverity shut up would be to replace "if(shader->gl_shaders) {" with "if (shader->num_gl_shaders)". Wouldn't the code in find_gl_pshader() in pixelshader.c cause the same warning though?
On Sun, Mar 22, 2009 at 2:57 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
2009/3/22 James Hawkins <truiken(a)gmail.com>:
--- dlls/wined3d/vertexshader.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
I guess the nicer way to make Coverity shut up would be to replace "if(shader->gl_shaders) {" with "if (shader->num_gl_shaders)". Wouldn't the code in find_gl_pshader() in pixelshader.c cause the same warning though?
Yea, it's CID 863 which Marcus labeled as 'false', though I don't think that's right. The assumption is that gl_shaders is NULL if num_gl_shaders == 0, so it can be documented with the assert, or the check can be changed to use num_gl_shaders instead (in both file). Since you are more involved with this module, I'll leave it up to you to send in a patch if that's alright with you. -- James Hawkins
participants (2)
-
Henri Verbeet -
James Hawkins