Martin Gansser wrote on 03/21/2017 07:17 PM:
the build of vdr-mp3 fails during the fc26 mass build with this error: error: 
call of overloaded 'abs(unsigned int)' is ambiguous
build.log: http://koji.rpmfusion.org/kojifiles/work/tasks/811/90811/build.log

This is the part of the affected code:

bool cOutputOss::Reset(unsigned int sr)
{
  if(fd>=0) {
    CHECK(ioctl(fd,SNDCTL_DSP_SYNC,0));
    int format=AFMT_S16_LE;
    CHECK(ioctl(fd,SNDCTL_DSP_SETFMT,&format));
    if(format==AFMT_S16_LE) {
      int channels=2;
      CHECK(ioctl(fd,SNDCTL_DSP_CHANNELS,&channels));
      if(channels==2) {
        int real=sr;
        CHECK(ioctl(fd,SNDCTL_DSP_SPEED,&real));
        d(printf("oss: DSP samplerate now %d\n",real))
        if((unsigned int)abs(real-sr)<sr/50) {
          outSr=sr;
          d(printf("mp3-oss: DSP reset done\n"))
          return true;
          }

how can i fix this ?

Well, abs is abs(int). Here sr is unsigned int, so
at the line abs(real - sr), "real - sr" has type "unsigned int",
so this is ambiguous.

Maybe abs(real - (int)sr) is intended?

Regards,
Mamoru

_______________________________________________
rpmfusion-developers mailing list -- rpmfusion-developers@lists.rpmfusion.org
To unsubscribe send an email to rpmfusion-developers-le...@lists.rpmfusion.org


_______________________________________________
rpmfusion-developers mailing list -- rpmfusion-developers@lists.rpmfusion.org
To unsubscribe send an email to rpmfusion-developers-le...@lists.rpmfusion.org

Reply via email to