Commit graph

3736 commits

Author SHA1 Message Date
Sebastian Pipping
646ddfd85a
Merge pull request #694 from joycebrum/master
Actions: Set permissions to "contents: read" to avoid permissive workflows
2023-03-07 23:03:11 +01:00
Joyce
c01d732693 chore: change cmake permission to read
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
fbabafb07a chore: valid-xml to contents: read
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
9252ad1c13 chore: macos as contents read
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
4120f1f2a0 chore: linux.yml as contents read
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
edb6ff0a1d chore: expat config with contents read
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
a9ddc7c16b chore: cppcheck as contents read
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
20350af2da chore: set coverage.yml permissions.
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
b1c7b3faa6 chore cmake-required-version write all
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Joyce
6adbab301a chore: set permissions to autotools-cmake
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-07 18:20:07 +00:00
Sebastian Pipping
f2925e6183
Merge pull request #695 from libexpat/fix-coverage-sh-for-forks
coverage.sh: Be robust towards absence of Git tags
2023-03-07 19:10:03 +01:00
Sebastian Pipping
f103a4fd00 coverage.sh: Be robust towards absence of Git tags
.. e.g. when someone forks the Git repository
in a way that only copies the master branch but
no tags.
2023-03-07 03:03:16 +01:00
Sebastian Pipping
fd41d749b1
Merge pull request #692 from OTheDev/patch-1
Silence dead code warnings caused by if (0) and company
2023-02-19 21:09:34 +01:00
oda-gitso
1056758a33 lib: Address -Wunreachable-code for Clang 2023-02-20 01:13:58 +07:00
Sebastian Pipping
0a69634eb4
Merge pull request #689 from libexpat/fix-clang-ci
Fix Linux CI / Make sure that AddressSanitizer Clang files are always available
2023-01-13 22:26:43 +01:00
Sebastian Pipping
e1a9d0eb4f linux.yml: Make sure that AddressSanitizer files are always available
Symptom was:
> /usr/bin/ld: cannot find /usr/lib/llvm-15/lib/clang/15.0.7/lib/linux/libclang_rt.asan_static-x86_64.a: No such file or directory
> /usr/bin/ld: cannot find /usr/lib/llvm-15/lib/clang/15.0.7/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory

Related:
https://github.com/llvm/llvm-project/issues/60008
2023-01-13 19:14:46 +01:00
Sebastian Pipping
48ba350889
Merge pull request #687 from libexpat/dependabot/github_actions/actions/upload-artifact-3.1.2
Actions(deps): Bump actions/upload-artifact from 3.1.1 to 3.1.2
2023-01-09 19:48:04 +01:00
Sebastian Pipping
841de7cfad
Merge pull request #688 from libexpat/dependabot/github_actions/actions/checkout-3.3.0
Actions(deps): Bump actions/checkout from 3.2.0 to 3.3.0
2023-01-09 19:27:16 +01:00
dependabot[bot]
cab663ff16
Actions(deps): Bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 12:01:38 +00:00
dependabot[bot]
b000574319
Actions(deps): Bump actions/upload-artifact from 3.1.1 to 3.1.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 12:01:34 +00:00
Sebastian Pipping
7fa8b3ad59
Merge pull request #680 from libexpat/dependabot/github_actions/actions/checkout-3.2.0
Actions(deps): Bump actions/checkout from 3.1.0 to 3.2.0
2022-12-20 01:37:53 +01:00
dependabot[bot]
bd92faf0f2
Actions(deps): Bump actions/checkout from 3.1.0 to 3.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 12:01:18 +00:00
Sebastian Pipping
0476f9cb84
Merge pull request #678 from libexpat/autotools-sync-cmake-files
Autotools: Get CMake templates back in sync with CMake of GitHub Actions image "ubuntu-20.04"
2022-11-27 01:54:39 +01:00
Sebastian Pipping
795f6f9759 Changes: Document #678 2022-11-25 22:58:37 +01:00
Sebastian Pipping
18f9122216 Autotools: Get CMake templates back in sync with ubuntu-20.04 2022-11-25 22:57:14 +01:00
Sebastian Pipping
441f98d02d
Merge pull request #675 from libexpat/fix-ci
Fix CI / coverage.yml: Drop ppa:ondrej/php removal
2022-11-04 20:29:51 +01:00
Sebastian Pipping
6c4749f395 coverage.yml: Drop ppa:ondrej/php removal
.. because image ubuntu-22.04 just stopped adding repository ppa:ondrej/php.
Related commit:
cc71c8b504
2022-11-04 18:38:49 +01:00
Sebastian Pipping
41c9daa337
Merge pull request #670 from seanm/more-const
Fix some -Wcast-qual Clang warnings
2022-11-02 18:15:14 +01:00
Sean McBride
cb7f93922e Simplify code by using SB_BYTE_TYPE macro
This also fixes -Wcast-qual warnings, which was the original motivation.
2022-11-02 12:17:18 -04:00
Sean McBride
c094e450a1 Fixed some clang -Wcast-qual warnings
Mostly added various missing consts, thus eliminating the casting away of constness. In a few cases, just removed unnecessary casts entirely.
2022-11-01 18:54:12 -04:00
Sebastian Pipping
d4373f337f
Merge pull request #673 from libexpat/examples-element-declarations
examples: Add new example on element declarations
2022-11-01 23:51:46 +01:00
Sean McBride
fc594f380d Fixed some -Wcast-qual warnings by just using NULL for default value of output param
The `endptr` parameter of both tcstof() and strtoul() are output-only; its initial value is not read, and so may as well be NULL.
2022-11-01 17:20:26 -04:00
Sebastian Pipping
e924330f98 Changes: Document #673 2022-11-01 21:46:01 +01:00
Sebastian Pipping
ad697455cb cmake: Resolve duplication related to building examples 2022-11-01 21:44:22 +01:00
Sebastian Pipping
a43efacb1b
Merge pull request #672 from neheb/23
CMake: Lowercase off_t and size_t
2022-11-01 20:21:44 +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
7ca7dbe24a
Merge pull request #671 from seanm/getDebugLevel
Fix getDebugLevel handling of empty environment variable value
2022-10-27 21:22:42 +02:00
Sean McBride
1f7a781884 Fixed getDebugLevel handling of empty env var
Reformulated strtoul() error checking to also check if the returned 'afterValue' is set to the beginning of the input sting, which indicates that there were no digits at all.
2022-10-27 14:02:44 -04:00
Rosen Penev
917e5db3b1 cmake: lowercase off_t and size_t
Because of a bug in meson, defines need to be the same case.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-26 16:41:33 -07:00
Sebastian Pipping
f85fff6e11
Merge pull request #669 from seanm/misc-warnings
Fix miscellaneous Clang and Cppcheck 2.9 style warnings
2022-10-26 22:50:23 +02:00
Sean McBride
087e0327e8 Partly fixed a clang -Wreserved-id-macro warning with _GNU_SOURCE
_GNU_SOURCE is only defined for the syscall() function, so only define it if HAVE_SYSCALL_GETRANDOM is also defined.

This fixes the only remaining -Wreserved-id-macro, at least for many cases (like macOS, Windows, and BSD).
2022-10-26 14:57:47 -04:00
Sean McBride
417f46b895 Replaced all sprintf with safer snprintf
Although they differ in return values, none of the calls look at the return value.
2022-10-26 14:57:47 -04:00
Sean McBride
ce15e2c219 Fixed cppcheck 2.9 warnings
The warnings were:

variableScope,expat/tests/chardata.c:83,style,The scope of the variable 'buffer' can be reduced.

constParameter,expat/tests/memcheck.c:85,style,Parameter 'ptr' can be declared as pointer to const

variableScope,expat/tests/structdata.c:106,style,The scope of the variable 'i' can be reduced.
2022-10-26 14:57:46 -04:00
Sean McBride
e3c91d0770 Fixed most clang -Wunused-macros warnings
These are indeed dead code.
2022-10-26 14:57:23 -04:00
Sebastian Pipping
654d2de0da
Merge pull request #668 from libexpat/issue-667-prepare-release
Prepare release 2.5.0 (part of #667)
2022-10-25 17:08:13 +02:00
Sebastian Pipping
fe8ff0345f Changes: Add note on impact of CVE-2022-43680 2022-10-25 15:21:40 +02:00
Sean McBride
0212538640 Fixed most clang -Wreserved-id-macro warnings
Renamed to not start with underscore + uppercase, which is reserved.
2022-10-25 09:06:44 -04:00