After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748128 - avfvideosrc: fix build failure with clang
avfvideosrc: fix build failure with clang
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-19 04:08 UTC by Yujin Lee
Modified: 2015-04-19 11:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
avfvideosrc: fix build failure with clang (986 bytes, patch)
2015-04-19 04:15 UTC, Yujin Lee
committed Details | Review

Description Yujin Lee 2015-04-19 04:08:46 UTC
There is a build error when avfvideosrc is compiled with clang.

...
Making all in sys
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C applemedia
  OBJC     libgstapplemedia_la-plugin.lo
  OBJC     libgstapplemedia_la-avfvideosrc.lo
avfvideosrc.m:467:15: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
          if (abs (framerate - max_frame_rate) < 0.00001) {
              ^
avfvideosrc.m:467:15: note: use function 'fabs' instead
          if (abs (framerate - max_frame_rate) < 0.00001) {
              ^~~
              fabs
1 error generated.
make[3]: *** [libgstapplemedia_la-avfvideosrc.lo] Error 1
make[2]: *** [applemedia] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Comment 1 Yujin Lee 2015-04-19 04:15:56 UTC
Created attachment 301923 [details] [review]
avfvideosrc: fix build failure with clang

This commit fixes build failure by clang with [-Werror,-Wabsolute-value] options.
Comment 2 Tim-Philipp Müller 2015-04-19 11:55:22 UTC
Comment on attachment 301923 [details] [review]
avfvideosrc: fix build failure with clang

Thanks, pushed:

commit 4a88951c52c96744cae62918b4989c90761b98bd
Author: Yujin Lee <saddopop@gmail.com>
Date:   Sun Apr 19 13:12:05 2015 +0900

    avfvideosrc: fix build failure with clang
    
    Use fabs for floating point input.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748128