Skip to content

Commit

Permalink
Fix build failures discovered by an upcoming gcc-14 release (#1730)
Browse files Browse the repository at this point in the history
  • Loading branch information
trofi committed Jan 11, 2024
1 parent 6c832ed commit 21d8b26
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion c/shared/source/t1write/t1write.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ static int saveCstr(t1wCtx h, abfGlyphInfo *info,
if (info != NULL && info->flags & ABF_GLYPH_CID &&
!(h->arg.flags & T1W_TYPE_HOST)) {
/* CID-keyed incremental download; write fd index */
if (writeTmp(h, 1, &info->iFD))
unsigned char c = info->iFD;
if (writeTmp(h, 1, &c))
return 1;
cstr->length++;
}
Expand Down
4 changes: 2 additions & 2 deletions c/shared/source/tx_shared/tx_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static long stm_tell(ctlStreamCallbacks *cb, void *stream) {
}

/* Read from stream. */
static size_t stm_read(ctlStreamCallbacks *cb, Stream *stream, char **ptr) {
static size_t stm_read(ctlStreamCallbacks *cb, void *stream, char **ptr) {
Stream *s = stream;
switch (s->type) {
case stm_Src:
Expand All @@ -405,7 +405,7 @@ static size_t stm_read(ctlStreamCallbacks *cb, Stream *stream, char **ptr) {
return 0; /* Suppress compiler warning */
}

static size_t stm_xml_read(ctlStreamCallbacks *cb, Stream *stream, xmlDocPtr *doc){
static size_t stm_xml_read(ctlStreamCallbacks *cb, void *stream, xmlDocPtr *doc){
int res;
int readAmt = 0;
xmlParserCtxtPtr ctxt;
Expand Down
6 changes: 3 additions & 3 deletions c/shared/source/uforead/uforead.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ static void updateGLIFRec(ufoCtx h, char* glyphName, xmlNodePtr cur) {
if (fileName == NULL) {
/* this is basically muted for now, as the previous check will return and skip if not parseable.
We'll add this back once we add verbosity flag */
message(h, ufoErrParse, "Encountered glyph reference %s in alternate layer's contents.plist with an empty file path. ", glyphName);
message(h, "Encountered glyph reference %s in alternate layer's contents.plist with an empty file path. ", glyphName);
return;
}

Expand Down Expand Up @@ -2004,7 +2004,7 @@ static long strtolCheck(ufoCtx h, char* keyValue, bool fail, char* msg, int base
fatal(h, ufoErrParse, msg);
else if (msg)
message(h, msg);
return NULL;
return 0;
}
}

Expand All @@ -2019,7 +2019,7 @@ static unsigned long strtoulCheck(ufoCtx h, char* keyValue, bool fail, char* msg
fatal(h, ufoErrParse, msg);
else if (msg)
message(h, msg);
return NULL;
return 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/tx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ def test_alt_missing_glyph():
assert msg in output
expected_path = generate_ps_dump(expected_path)
output_path = generate_ps_dump(output_path)
assert differ([expected_path, output_path])
assert differ([expected_path, output_path, '-s', PFA_SKIP[0]])


def test_parsing_attrs_bug1673():
Expand Down

0 comments on commit 21d8b26

Please sign in to comment.