Giter Club home page Giter Club logo

Comments (5)

flibitijibibo avatar flibitijibibo commented on August 21, 2024 1

Some commits to deal with these warnings:

5609c6b
ab45f64
8781641
87bfe65

Probably won't modify any of the stb_vorbis stuff unless Sean is interested in those changes.

from faudio.

flibitijibibo avatar flibitijibibo commented on August 21, 2024 1

This all works for me - ran the tool locally (F28 version) and the build/output seems good. Glad that I can start using this stuff again... let's make sure this keeps working throughout the rest of the CMake work.

from faudio.

flibitijibibo avatar flibitijibibo commented on August 21, 2024

The break condition is definitely crappy, but at the same time the code should always break in the middle. If nothing else uses i we can change to an int32_t and that'll make it safer, but maybe we can make this loop nicer in general.

from faudio.

pchome avatar pchome commented on August 21, 2024

FYI: you can detect more of them by using e.g. clang-tidy.

clang-tidy can utilize compile_commands.json generated for Ninja, so I'm usually using it like this:

meson --prefix /tmp/faud /tmp/faud64
cd /tmp/faud64
/usr/lib/llvm/7/share/clang/run-clang-tidy.py -header-filter='.*' \
-extra-arg="-DHAVE_FFMPEG" -extra-arg="-isystem/usr/include/SDL2" \
-checks='-clang-diagnostic-unused-command-line-argument,-clang-diagnostic-implicit-function-declaration' -quiet

Output: FAudio-clang-tidy-output.txt

Checks and descriptions: https://clang.llvm.org/extra/clang-tidy/checks/list.html

Example2: all checks disabled, except bugprone-* ones, and "auto-fix" (if possible) allowed

$ clang-tidy -header-filter=.* -checks=-*,bugprone-* -extra-arg=-isystem/usr/include/SDL2 -p=/tmp/faud64 -quiet -fix /tmp/FAudio/src/XNA_Song.c

from faudio.

NeroBurner avatar NeroBurner commented on August 21, 2024

clang tidy can also be started directly through cmake, just tried it with the following commands

cmake -H. -B_build -DCMAKE_C_CLANG_TIDY=clang-tidy -DCMAKE_CXX_CLANG_TIDY=clang-tidy  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
cmake --build _build

this builds libFAudio.so with clang and outputs clang-tidy warnings while building.

from faudio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.