mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 03:15:30 +00:00
Fix some code scanning issues.
This commit is contained in:
parent
528c89ef86
commit
73c05c8b23
4
.github/codeql.yml
vendored
4
.github/codeql.yml
vendored
@ -1,5 +1,6 @@
|
||||
paths-ignore:
|
||||
- testsuite
|
||||
- testmxml.c
|
||||
|
||||
query-filters:
|
||||
- exclude:
|
||||
@ -46,3 +47,6 @@ query-filters:
|
||||
id: cpp/nested-loops-with-same-variable
|
||||
- exclude:
|
||||
id: cpp/stack-address-escape
|
||||
- exclude:
|
||||
id: cpp/world-writable-file-creation
|
||||
|
||||
|
@ -556,7 +556,7 @@ mxmlSaveIO(
|
||||
if (col > 0)
|
||||
{
|
||||
// Make sure the file ends with a newline...
|
||||
if ((io_cb)(io_cbdata, "\n", 1) < 0)
|
||||
if ((io_cb)(io_cbdata, "\n", 1) != 1)
|
||||
return (false);
|
||||
}
|
||||
|
||||
@ -914,8 +914,6 @@ mxml_getc(mxml_options_t *options, // I - Options
|
||||
break;
|
||||
}
|
||||
|
||||
// MXML_DEBUG("mxml_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch);
|
||||
|
||||
if (mxml_bad_char(ch))
|
||||
{
|
||||
_mxml_error(options, "Bad control character 0x%02x not allowed by XML standard.", ch);
|
||||
|
@ -57,7 +57,6 @@ main(int argc, // I - Number of command-line args
|
||||
*tree, // Element tree
|
||||
*node; // Node which should be in test.xml
|
||||
mxml_index_t *ind; // XML index
|
||||
mxml_type_t type; // Node type
|
||||
char buffer[16384]; // Save string
|
||||
const char *text; // Text string
|
||||
bool whitespace; // Whitespace before text string
|
||||
|
Loading…
Reference in New Issue
Block a user