Date: Tue, 11 May 2021 15:24:51 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 255796] multimedia/smpeg: fix incorrect clang warning suppression flag. Message-ID: <bug-255796-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255796 Bug ID: 255796 Summary: multimedia/smpeg: fix incorrect clang warning suppression flag. Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: acm@FreeBSD.org Reporter: dim@FreeBSD.org Flags: maintainer-feedback?(acm@FreeBSD.org) Assignee: acm@FreeBSD.org Created attachment 224853 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D224853&action= =3Dedit Use -Wno-c++11-narrowing instead of -Wno-error-narrowing During an exp-run for llvm 12 (see bug 255570), it turned out that multimedia/smpeg does not build with clang 12.0.0 [1]: libtool: compile: c++ -DPACKAGE=3D\"smpeg\" -DVERSION=3D\"0.4.4\" -I. -I. = -O2 -pipe -Wno-error-narrowing -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include/SDL -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -DTHREADED_AUDIO -DNDEBUG -I.. -DNOCONTROLS -I.. -I../audio -I../video -fno-exceptions -fno-rtti -c huffmantable.cpp -fPIC -DPIC -o .libs/huffmantable.o warning: unknown -Werror warning specifier: '-Wno-error-narrowing' [-Wunknown-warning-option] In file included from huffmantable.cpp:12: ../MPEGaudio.h:129:7: warning: 'register' storage class specifier is deprec= ated and incompatible with C++17 [-Wdeprecated-register] register int r=3D(buffer[bitindex>>3]>>(7-(bitindex&7)))&1; ^~~~~~~~~ ../MPEGaudio.h:135:7: warning: 'register' storage class specifier is deprec= ated and incompatible with C++17 [-Wdeprecated-register] register unsigned short a; ^~~~~~~~~ huffmantable.cpp:553:8: error: constant expression evaluates to -1 which ca= nnot be narrowed to type 'unsigned int' [-Wc++11-narrowing] { 0, 0-1, 0-1, 0, 0, htd33}, ^~~ huffmantable.cpp:553:8: note: insert an explicit cast to silence this issue { 0, 0-1, 0-1, 0, 0, htd33}, ^~~ [... more of these ...] The Makefile attempts to suppress these warnings by adding -Wno-error-narro= wing to CFLAGS, in case clang is used, but this warning suppression flag does not exist. It is called -Wno-c++11-narrowing instead, and the attached patch renames the flag. Note that it might be better to compile all of the port with -std=3Dgnu++98= since it is very old C++ code, but it does not seem to respect USE_CXXSTD=3Dgnu++= 98, as the configure scripts are also pretty old. Better not try to mess with it t= oo much... [1] http://package22.nyi.freebsd.org/data/mainamd64PR255570-default/2021-05-08_= 16h02m24s/logs/smpeg-0.4.4_15.log --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255796-7788>