mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2024-12-26 13:28:22 +01:00
Fix the one "value" complaint from CodeQL and suppress all useless queries.
This commit is contained in:
parent
c7101ae9dd
commit
948ee16b06
19
.github/codeql.yml
vendored
19
.github/codeql.yml
vendored
@ -1,7 +1,22 @@
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'test*.c'
|
- 'test**.c'
|
||||||
|
|
||||||
query-filters:
|
query-filters:
|
||||||
- exclude:
|
- exclude:
|
||||||
id: cpp/commented-out-code
|
id: cpp/commented-out-code
|
||||||
|
- exclude:
|
||||||
|
id: cpp/toctou-race-condition
|
||||||
|
- exclude:
|
||||||
|
id: cpp/weak-cryptographic-algorithm
|
||||||
|
- exclude:
|
||||||
|
id: cpp/world-writable-file-creation
|
||||||
|
- exclude:
|
||||||
|
id: cpp/uncontrolled-allocation-size
|
||||||
|
- exclude:
|
||||||
|
id: cpp/path-injection
|
||||||
|
- exclude:
|
||||||
|
id: cpp/stack-address-escape
|
||||||
|
- exclude:
|
||||||
|
id: cpp/loop-variable-changed
|
||||||
|
- exclude:
|
||||||
|
id: cpp/long-switch
|
||||||
|
6
ttf.c
6
ttf.c
@ -420,7 +420,7 @@ ttfCreate(const char *filename, // I - Filename
|
|||||||
if (read_os_2(font, &os_2))
|
if (read_os_2(font, &os_2))
|
||||||
{
|
{
|
||||||
// Copy key values from OS/2 table...
|
// Copy key values from OS/2 table...
|
||||||
static const ttf_stretch_t widths[] =
|
static const ttf_stretch_t stretches[] =
|
||||||
{
|
{
|
||||||
TTF_STRETCH_ULTRA_CONDENSED, // ultra-condensed
|
TTF_STRETCH_ULTRA_CONDENSED, // ultra-condensed
|
||||||
TTF_STRETCH_EXTRA_CONDENSED, // extra-condensed
|
TTF_STRETCH_EXTRA_CONDENSED, // extra-condensed
|
||||||
@ -433,8 +433,8 @@ ttfCreate(const char *filename, // I - Filename
|
|||||||
TTF_STRETCH_ULTRA_EXPANDED // ultra-expanded
|
TTF_STRETCH_ULTRA_EXPANDED // ultra-expanded
|
||||||
};
|
};
|
||||||
|
|
||||||
if (os_2.usWidthClass >= 1 && os_2.usWidthClass <= (int)(sizeof(widths) / sizeof(widths[0])))
|
if (os_2.usWidthClass >= 1 && os_2.usWidthClass <= (int)(sizeof(stretches) / sizeof(stretches[0])))
|
||||||
font->stretch = widths[os_2.usWidthClass - 1];
|
font->stretch = stretches[os_2.usWidthClass - 1];
|
||||||
|
|
||||||
font->weight = (short)os_2.usWeightClass;
|
font->weight = (short)os_2.usWeightClass;
|
||||||
font->cap_height = os_2.sCapHeight;
|
font->cap_height = os_2.sCapHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user