Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable -Wundef for C++ code #456

Closed
wants to merge 14 commits into from
Closed

Conversation

ulmus-scott
Copy link
Contributor

@ulmus-scott ulmus-scott commented Jan 10, 2022

Disable -Wundef for external/libexiv2/ because of noise from xmpsdk/include/*.

See individual commits for details.

<cstdint> is used unconditionally in the file, so remove the unnecessary checks
The other uses were already ifdef.
HAVE_GETOPT_H is never defined and getopt is not used in this file, so remove all of it.
SoundTouch is detected with pkgconfig, which on Ubuntu has:
includedir=${prefix}/include
Cflags: -I${includedir}/soundtouch

GCC sees SoundTouch.h as a non-system header and gives warnings for -Wundef.
/usr/include/soundtouch/STTypes.h:81:11: warning: "SOUNDTOUCH_INTEGER_SAMPLES" is not defined, evaluates to 0 [-Wundef]
   81 |     #if !(SOUNDTOUCH_INTEGER_SAMPLES || SOUNDTOUCH_FLOAT_SAMPLES)
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/soundtouch/STTypes.h:102:10: warning: "_M_IX86" is not defined, evaluates to 0 [-Wundef]
  102 |     #if (_M_IX86 || __i386__ || __x86_64__ || _M_X64)
      |          ^~~~~~~
/usr/include/soundtouch/STTypes.h:102:21: warning: "__i386__" is not defined, evaluates to 0 [-Wundef]
  102 |     #if (_M_IX86 || __i386__ || __x86_64__ || _M_X64)

Including as <soundtouch/SoundTouch.h> suppresses the warnings, since GCC now sees it as a system header.
by removing the dts seeking hack, which hasn't compiled since
the FFmpeg 5.1 merge, which moved AVStream::cur_dts to the internal
struct FFStream.
Disable -Wundef for external/libexiv2/ because of noise from xmpsdk/include/*
@bennettpeter
Copy link
Member

Merged into master

@ulmus-scott ulmus-scott deleted the Wundef branch November 30, 2022 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants