Merge branch 'master' into UseNewMetaDataTypesInFBXConverter

pull/4999/head
Kim Kulling 2023-03-08 10:53:00 +01:00 committed by GitHub
commit 05249353d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 2 deletions

View File

@ -57,3 +57,13 @@ jobs:
- name: test
run: cd build/bin && ./unit
shell: bash
job3:
name: printf-sanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: run scan_printf script
run: ./scripts/scan_printf.sh
shell: bash

View File

@ -490,7 +490,7 @@ bool OgreXmlSerializer::ImportSkeleton(Assimp::IOSystem *pIOHandler, MeshXml *me
OgreXmlSerializer serializer(xmlParser.get());
XmlNode root = xmlParser->getRootNode();
if (std::string(root.name()) != nnSkeleton) {
printf("\nSkeleton is not a valid root: %s\n", root.name());
ASSIMP_LOG_VERBOSE_DEBUG("nSkeleton is not a valid root: ", root.name(), ".");
for (auto &a : root.children()) {
if (std::string(a.name()) == nnSkeleton) {
root = a;

View File

@ -150,7 +150,6 @@ public:
// -------------------------------------------------------------------
/// @brief Tests for the existence of a file at the given path.
bool Exists(const char* pFile) const override {
printf("Exists\n");
if (0 == strncmp( pFile, AI_MEMORYIO_MAGIC_FILENAME, AI_MEMORYIO_MAGIC_FILENAME_LENGTH ) ) {
return true;
}

View File

@ -0,0 +1,13 @@
#!/bin/bash
grep \
--include=\*.{c,cpp,h} \
--exclude={pstdint,m3d}.h \
-rnw include code \
-e '^\s*printf'
if [ $? -eq 0 ]; then
echo "Debug statement(s) detected. Please uncomment (using single-line comment), remove, or manually add to exclude filter, if appropriate"
exit 1
fi