tomato-testing/.github/scripts/flags-gcc.sh
Green Sky cae0ab9c5c Squashed 'external/toxcore/c-toxcore/' changes from 03e9fbf3703..55752a2e2ef
55752a2e2ef fix(toxav): pass video bit rate as kbit Previously we unintentionally made it Mbit.
7e573280a75 docs(toxav): fix docs of toxav.h - fix units to be more readable - use width before height consistently - video -> audio typo
5f88a084e8c fix: friend_connections leak on allocation failure clean up when it only contains connections in the NONE state
6d27a1ae178 fix: wrong comment for closelist
ce4f29e8036 cleanup: Fix all `-Wsign-compare` warnings.
4d4251c397f chore: lower cirrus ci timeout drastically
40676284507 fix: events leak that can occur if allocation fails rare in practice, found by fuzzing
9610ac31c5f fix: Return an error instead of crashing on nullptr args in NGC.
a57c2c8f956 refactor: Make ToxAV independent of toxcore internals.
5752fc29f86 refactor: Make tox-bootstrapd use bool instead of int
df675786eb2 chore: Add release-drafter github action.
03fd7a69dcf chore: Use toktok's cmp instead of upstream.
350c0ba1205 cleanup: Sort apk/apt install commands in Dockerfiles.
8c1bda502cb chore(deps): bump golang.org/x/net
ddb9d3210da chore: Upgrade to FreeBSD 14.1 in cirrus build.
e9076f45bd3 chore(cmake): set options changes as cache and with force

git-subtree-dir: external/toxcore/c-toxcore
git-subtree-split: 55752a2e2ef894bfa6d7a2a21a0278e3f2bede7d
2024-11-09 13:44:30 +01:00

63 lines
1.8 KiB
Bash

#!/bin/bash
. .github/scripts/flags.sh
# Add all warning flags we can.
add_flag -Wall
add_flag -Wextra
# Some additional warning flags not enabled by any of the above.
add_flag -Wbool-compare
add_flag -Wcast-align
add_flag -Wcast-qual
add_flag -Wchar-subscripts
add_flag -Wdouble-promotion
add_flag -Wduplicated-cond
add_flag -Wempty-body
add_flag -Wenum-compare
add_flag -Wfloat-equal
add_flag -Wformat=2
add_flag -Wframe-address
add_flag -Wframe-larger-than=9000
add_flag -Wignored-attributes
add_flag -Wignored-qualifiers
add_flag -Winit-self
add_flag -Winline
add_flag -Wlarger-than=530000
add_flag -Wmaybe-uninitialized
add_flag -Wmemset-transposed-args
add_flag -Wmisleading-indentation
add_flag -Wmissing-declarations
add_flag -Wnonnull
add_flag -Wnull-dereference
add_flag -Wodr
add_flag -Wredundant-decls
add_flag -Wreturn-type
add_flag -Wshadow
add_flag -Wsuggest-attribute=format
add_flag -Wundef
add_flag -Wunsafe-loop-optimizations
add_flag -Wunused-but-set-parameter
add_flag -Wunused-but-set-variable
add_flag -Wunused-label
add_flag -Wunused-local-typedefs
add_flag -Wunused-value
# Disable specific warning flags for both C and C++.
# struct Foo foo = {0}; is a common idiom.
add_flag -Wno-missing-field-initializers
# Checked by clang, but gcc is warning when it's not necessary.
add_flag -Wno-sign-compare
# File transfer code has this.
add_flag -Wno-type-limits
# Callbacks often don't use all their parameters.
add_flag -Wno-unused-parameter
# cimple does this better
add_flag -Wno-unused-function
# struct Foo foo = {0}; is a common idiom. Missing braces means we'd need to
# write {{{0}}} in some cases, which is ugly and a maintenance burden.
add_flag -Wno-missing-braces
# __attribute__((nonnull)) causes this warning on defensive null checks.
add_flag -Wno-nonnull-compare