[Scummvm-git-logs] scummvm master -> 3cd80757715fe6b341d8b4fca503fdc1ca8da3ca
dreammaster
noreply at scummvm.org
Fri Jun 3 01:30:31 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3cd8075771 GLK: Remove pointless NULL validation
Commit: 3cd80757715fe6b341d8b4fca503fdc1ca8da3ca
https://github.com/scummvm/scummvm/commit/3cd80757715fe6b341d8b4fca503fdc1ca8da3ca
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2022-06-02T18:30:27-07:00
Commit Message:
GLK: Remove pointless NULL validation
Reported by GCC 12:
../scummvm/engines/glk/tads/tads2/debug.cpp: In function 'int Glk::TADS::TADS2::dbgnam(dbgcxdef*, char*, int, int)':
../scummvm/engines/glk/tads/tads2/debug.cpp:158:47: warning: the address of 'Glk::TADS::TADS2::tokthdef::tokthhsh' will never be NULL [-Waddress]
158 | if (!ctx->dbgcxtab || !ctx->dbgcxtab->tokthhsh)
| ~~~~~~~~~~~~~~~^~~~~~~~
In file included from ../scummvm/engines/glk/tads/tads2/run.h:42,
from ../scummvm/engines/glk/tads/tads2/debug.cpp:24:
../scummvm/engines/glk/tads/tads2/tokenizer.h:222:19: note: 'Glk::TADS::TADS2::tokthdef::tokthhsh' declared here
222 | tokthpdef tokthhsh[TOKHASHSIZE]; /* hash table */
| ^~~~~~~~
Changed paths:
engines/glk/tads/tads2/debug.cpp
diff --git a/engines/glk/tads/tads2/debug.cpp b/engines/glk/tads/tads2/debug.cpp
index 0cf73fc75b7..b641c3295ea 100644
--- a/engines/glk/tads/tads2/debug.cpp
+++ b/engines/glk/tads/tads2/debug.cpp
@@ -155,7 +155,7 @@ int dbgnam(dbgcxdef *ctx, char *outbuf, int typ, int val)
{
toksdef sym;
- if (!ctx->dbgcxtab || !ctx->dbgcxtab->tokthhsh)
+ if (!ctx->dbgcxtab)
{
memcpy(outbuf, "<NO SYMBOL TABLE>", (size_t)17);
return(17);
More information about the Scummvm-git-logs
mailing list