Bug 230211 - multimedia/avidemux-plugins fails to build: ISO C++ forbids comparison between pointer and integer [-fpermissive] (upstream patch)
Summary: multimedia/avidemux-plugins fails to build: ISO C++ forbids comparison betwee...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-30 23:57 UTC by Vladimir Druzenko
Modified: 2018-08-01 07:57 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)


Attachments
Patch from upstream (620 bytes, patch)
2018-07-30 23:57 UTC, Vladimir Druzenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2018-07-30 23:57:08 UTC
Created attachment 195664 [details]
Patch from upstream

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_plugins/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_plugins/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.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2018-08-01 00:34:47 UTC
Gerald, you just fixed this issue by commit:
https://svnweb.freebsd.org/ports/head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__muxers_muxerMp4v2_libmp4v2_src_rtphint.cpp?revision=476028&view=markup

But my patch is same as in upstream.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-08-01 07:55:44 UTC
A commit references this bug:

Author: bar
Date: Wed Aug  1 07:55:20 UTC 2018
New revision: 476163
URL: https://svnweb.freebsd.org/changeset/ports/476163

Log:
  Re-create patch for avidemux-plugins after r464084 as in upstream.

  PR:	230211

Changes:
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__muxers_muxerMp4v2_libmp4v2_src_rtphint.cpp
  head/multimedia/avidemux-plugins/Makefile
Comment 3 Barbara Guida freebsd_committer freebsd_triage 2018-08-01 07:57:53 UTC
Patch modified as in upstream.
Thanks.