Commit graph

77 commits

Author SHA1 Message Date
Sebastian Pipping
750c985f11 Sync file headers 2024-11-06 17:42:20 +01:00
Hanno Böck
d827287012 Cast enum vars to unsigned int if used in printf
It is not specified by the C standard whether enum is unsigned,
therefore, make sure it is always unsigned if we print it as a
number.
2024-10-23 17:02:31 +02:00
Hanno Böck
424dd12400 Fix signedness of format strings
Format strings used %d to print variables with unsigned values.
Changing to %u to match signedness.
Fixes "clang -Wformat-signedness" warnings.
2024-10-20 08:45:59 +02:00
Sebastian Pipping
57fc7b1379 .gitignore: Add missing example "element_declarations" 2024-09-05 15:00:02 +02:00
Sebastian Pipping
2a10e173ab Sync file headers 2024-02-06 14:13:00 +01:00
Sebastian Pipping
0b424cb9ae examples/element_declarations.c: Simplify first call to stackPushMalloc
.. where stackTop is NULL anyway
2024-01-12 17:25:27 +01:00
Sebastian Pipping
0ebca2b10f examples/element_declarations.c: Fix memleak in dumpContentModel on OOM
clang-tidy output was:
> [..]/examples/element_declarations.c:163:16: warning: Potential leak of memory pointed to by 'stackTop' [clang-analyzer-unix.Malloc]
>   163 |         return false;
>       |                ^
2024-01-12 04:46:47 +01:00
Sebastian Pipping
59fea9dd51 Sync file headers 2022-10-30 18:11:07 +01:00
Sebastian Pipping
48bc51fcf1 examples/element_declarations.c: Resolve recursion 2022-10-30 18:11:06 +01:00
Sebastian Pipping
7483d04a18 examples/element_declarations.c: Handle element declarations rather than elements 2022-10-30 18:10:42 +01:00
Sebastian Pipping
6b53a8de82 examples: Clone example "examples" to "element_declarations" 2022-10-30 17:54:48 +01:00
Sebastian Pipping
7e27f561a6 Sync file headers 2022-10-24 18:32:42 +02:00
Sebastian Pipping
9294082e74 examples: Add some whitespace for readability 2022-10-24 16:01:20 +02:00
Sebastian Pipping
dbf1202529 examples: Make use of XML_GetBuffer 2022-10-24 16:01:19 +02:00
Sebastian Pipping
2f38031778 examples/elements.c: Resolve unused include of <wchar.h> 2022-10-24 16:00:45 +02:00
Sebastian Pipping
77409cde88 examples/elements.c: Be consistent across examples regarding OOM detection 2022-10-24 16:00:45 +02:00
Sebastian Pipping
894b98d9b3 examples: Be consistent across examples regarding read looping and main exit 2022-10-24 16:00:45 +02:00
Sebastian Pipping
37386fd2d3 examples/elements.c: Be consistent in parse error reporting format across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping
2b3b95c670 examples/outline.c: Be consistent in main loop exit across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping
023b95dba0 examples/outline.c: Make element handler signatures consistent across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping
93a757ab7d examples/outline.c: Make use of BUFSIZ from stdio.h consistent across examples 2022-10-24 16:00:43 +02:00
Sebastian Pipping
fcb91e43bd examples: Make passing of depth pointer consistent across examples 2022-10-24 16:00:15 +02:00
Sebastian Pipping
9c7bd378b6 examples: Resolve use of unused variables argc and argv 2022-10-24 16:00:13 +02:00
Sebastian Pipping
56d85659ac examples/outline.c: Rename "Buff" to "buf" for consistency across examples 2022-10-24 01:29:05 +02:00
Sebastian Pipping
bd351fad20 examples/outline.c: Make "Buff" a local variable 2022-10-24 00:58:25 +02:00
Sebastian Pipping
7eaccc0332 examples/outline.c: Rename variable "p" to "parser" 2022-10-24 00:53:51 +02:00
Sebastian Pipping
317c91776a Sync file headers 2022-02-15 21:23:29 +01:00
Sebastian Pipping
df42f935bf Increase precision in existing MIT headers based on Git history 2021-05-02 19:53:29 +02:00
Jeffrey Walton
5c66485b86 Update Autotools to use AM_CPPFLAGS, AM_CFLAGS, and AM_CXXFLAGS 2020-03-17 20:35:20 +01:00
Sebastian Pipping
6b19963341 Drop mistaken executable bits 2019-09-16 20:54:47 +02:00
zhouzhongyuan
90e44cde80 fix potential memory leak in elements.c 2019-09-05 16:17:51 +08:00
Sebastian Pipping
36fa081cfe Drop support for Visual Studio <=7.1/2003
_MSC_VER 1400 is 8.0/2005
2019-08-29 19:49:27 +02:00
Sebastian Pipping
71485dcf8b win32: Remove MSVC solution and project files 2019-08-29 02:35:05 +02:00
clang-format
d248bbd940 Mass-apply clang-format 9 using ./apply-clang-format.sh 2019-08-03 21:31:44 +02:00
Sebastian Pipping
850c0922e1 Address 64bit size_t loss warning for Visual Studio
Message was:
warning C4267: 'argument' : conversion from 'size_t' to 'int'
2017-12-04 00:15:55 +01:00
Karl Waclawek
a1f553f5f5 Auto-upgrade of project files performed by Visual Studio 2017. This should not be a problem as the Community Edition of VS 2017 can be obtained for free. 2017-11-01 10:09:14 -04:00
Rhodri James
5baf114b7f examples: Use printf rather than [f]put[w]s (pull request #135) 2017-08-29 20:08:52 +02:00
Sebastian Pipping
c1e1a84c82 examples: Indent preprocessor code 2017-08-26 17:01:59 +02:00
Rhodri James
c7071f1434 Fix example programs to compile under XML_UNICODE_WCHAR_T 2017-08-26 16:57:36 +02:00
Sebastian Pipping
a704c940a4 Inline copyright headers with C/C++ code where missing (#116) 2017-08-12 21:02:41 +02:00
Sebastian Pipping
d4390f34f3 Replace handwritten Makefile with GNU Automake 2017-08-12 16:09:50 +02:00
Sebastian Pipping
8706f69ca7 examples: Unify expat.h include 2017-06-07 20:31:35 +02:00
Sebastian Pipping
4f862dddf9 examples|tests|xmlwf: Drop AmigaOS 4.x include (issue #14) 2017-06-07 20:31:15 +02:00
Sebastian Pipping
50e0dd88f0 Visual Studio 20xx: No longer define WIN32 2017-05-25 15:25:18 +02:00
Sebastian Pipping
a67f2a2545 *.dsp,*.dsw: Drop Visual Studio 6.0 (issue #14) 2017-04-25 23:51:59 +02:00
Karl Waclawek
309ad17f97 Added Visual Studio 2013 solution/project files. Will also work in Visual Studio 2015 if VS 2013 is installed. Otherwise, open a "Visual Studio 2015 Developer Command Prompt" and execute "devenv.exe /upgrade expat.sln" in the expat directory to upgrade the main solution and project files (Tests have their own solutions). 2016-06-17 14:34:46 -04:00
Sebastian Pipping
69746f5ab2 Address all "unused parameter" warnings 2016-05-07 17:24:35 +02:00
Sebastian Pipping
796085674a examples/elements.c: Address compile warning on sign mismatch
examples/elements.c: In function ‘main’:
examples/elements.c:54:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     done = len < sizeof(buf);
                ^
2016-03-12 02:59:53 +01:00
Karl Waclawek
794ff432aa Modified Windows project files to import properly into Visual Studio 2010. 2012-02-21 02:45:06 +00:00
Karl Waclawek
66d31c5506 Removed unnecessary linker dependencies. 2009-01-19 18:37:07 +00:00