Unused variable compiler warning (pairSetCount) #1642

Closed
opened 2018-02-23 09:58:35 +00:00 by norsetto · 1 comment
norsetto commented 2018-02-23 09:58:35 +00:00 (Migrated from github.com)

Hi! Not really an issue, more of a wish ... anyhow, there is an annoying compiler warning when processing stb_truetype.h:

stb_truetype.h:2454:42: warning: unused variable ‘pairSetCount’ [-Wunused-variable]
stbtt_uint16 pairSetCount = ttUSHORT(table + 8);

caused by the fact that this is only used in an assert; I just added a STBTT__NOTUSED(pairSetCount); after the STBTT_assert(coverageIndex < pairSetCount); to get rid of it.

Hi! Not really an issue, more of a wish ... anyhow, there is an annoying compiler warning when processing stb_truetype.h: stb_truetype.h:2454:42: warning: unused variable ‘pairSetCount’ [-Wunused-variable] stbtt_uint16 pairSetCount = ttUSHORT(table + 8); caused by the fact that this is only used in an assert; I just added a `STBTT__NOTUSED(pairSetCount);` after the `STBTT_assert(coverageIndex < pairSetCount);` to get rid of it.
ocornut commented 2018-02-23 10:08:54 +00:00 (Migrated from github.com)

Fixed, thanks! I'll make a pull request on the original repo as well.

Fixed, thanks! I'll make a pull request on the original repo as well.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#1642
No description provided.