maintainer-feedback requested: [Bug 230211] multimedia/avidemux-plugins fails to build: ISO C++ forbids comparison between pointer and integer [-fpermissive] (upstream patch)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jul 30 23:57:11 UTC 2018


Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-multimedia mailing
list <multimedia at FreeBSD.org> for maintainer-feedback:
Bug 230211: multimedia/avidemux-plugins fails to build: ISO C++ forbids
comparison between pointer and integer [-fpermissive] (upstream patch)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230211



--- Description ---
After update GCC from 6.4 to 7.3 multimedia/avidemux-plugins fails to build
with this error:
>
/tmp/work/usr/ports/multimedia/avidemux-plugins/work/avidemux_2.6.11/avidemux_p
lugins/ADM_muxers/muxerMp4v2/libmp4v2/src/rtphint.cpp: In member function 'void
mp4v2::impl::MP4RtpHintTrack::GetPayload(char**, uint8_t*, uint16_t*, char**)':
>
/tmp/work/usr/ports/multimedia/avidemux-plugins/work/avidemux_2.6.11/avidemux_p
lugins/ADM_muxers/muxerMp4v2/libmp4v2/src/rtphint.cpp:342:35: error: ISO C++
forbids comparison between pointer and integer [-fpermissive]
>		      if (pSlash != '\0') {

Look at code:
>    const char* pSlash;
…
>	     if (pSlash && ppEncodingParams) {
>		 pSlash++;
>		 pSlash = strchr(pSlash, '/');
>		 if (pSlash != NULL) {
>		     pSlash++;
>		     if (pSlash != '\0') {
Error on this line ^^^^^^^^^^^^^^^^^^^^^^^^.
Obvious it's incorrect code and most probably it have to be "if (*pSlash !=
'\0')".
>			 length = (uint32_t)strlen(pRtpMap) - (pSlash -
pRtpMap);
>			 *ppEncodingParams = (char *)MP4Calloc(length + 1);
>			 strncpy(*ppEncodingParams, pSlash, length);
>		     }
>		 }
>	     }

In upstream this line was replaced on "if (*pSlash)", as expected.

Just put file
patch-avidemux__plugins_ADM__muxers_muxerMp4v2_libmp4v2_src_rtphint.cpp in
multimedia/avidemux/files/ - work for me on 11.2 amd64 and i386.


More information about the freebsd-multimedia mailing list