From 38b25c5d347f0a9e69b1972754d3c63b38898229 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Thu, 13 Feb 2025 08:28:14 +0000 Subject: [PATCH] CodeQL InconsistentNullnessTest.ql ourgl != NULL ourgl local variable is set to a non-NULL value (first initialization) in code that is in lines below where it is dereferenced in a loop. Somewhere in the loop there is a point where the precondition of ourgl being set to non-null is expected. ASSERT added. --- graphics/grGlyphs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphics/grGlyphs.c b/graphics/grGlyphs.c index d9e879fe..cda3e5e5 100644 --- a/graphics/grGlyphs.c +++ b/graphics/grGlyphs.c @@ -140,6 +140,8 @@ GrReadGlyphs(filename, path, libPath, gl) /* an interesting line */ if (sizeline) { + /* this section appears to expect ourgl to be */ + ASSERT(ourgl, "ourgl"); if (y > 0) y--; /* scan from top down */ else