summaryrefslogtreecommitdiff
path: root/libavutil/attributes.h
Commit message (Collapse)AuthorAge
* avutil/attributes: add av_warn_unused_resultGanesh Ajjanagadde2015-10-05
| | | | | | | | | | | | | | GCC 3.4 introduced an attribute warn_unused_result to warn when a programmer discards the return value. Applying this judiciously across the codebase can help in fixing a lot of problems. At a high level, functions which return error codes should always be checked. More concretely, consider the functions ff_add_format and the like in avfilter/formats.h. A quick examination shows that a large portion of libavfilter fails to handle the associated errors, usually AVERROR(ENOMEM). The above example was where I observed the utility of this, but it should be useful in many places across the code base. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/attributes: add AV_GCC_VERSION_AT_MOSTJames Almer2015-09-18
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/attributes: Add () to protect the AV_GCC_VERSION_AT_LEAST() argumentsMichael Niedermayer2015-02-17
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '5858a67f135a7395c548482c73cf3d39bcdd3022'Michael Niedermayer2013-11-03
|\ | | | | | | | | | | | | * commit '5858a67f135a7395c548482c73cf3d39bcdd3022': attributes: disable flatten on llvm/clang Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * attributes: disable flatten on llvm/clangVittorio Giovara2013-11-03
| |
* | lavu/attributes: Don't define av_restrictAlex Smith2013-09-21
| | | | | | | | | | | | This is always defined in config.h. Original patch by Derek Buitenhuis.
* | Merge commit '33b88f2a4ae54d5397c45e39a5326289ebdc7747'Michael Niedermayer2013-09-20
|\| | | | | | | | | | | | | * commit '33b88f2a4ae54d5397c45e39a5326289ebdc7747': msvc/icl: Use __declspec(noinline) Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * msvc/icl: Use __declspec(noinline)Alex Smith2013-09-20
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * msvc/icl: Use __declspec(deprecated)Alex Smith2013-09-20
| | | | | | | | | | | | | | | | | | | | | | Prior to this on msvc/icl there was no handling of deprecated functions and the deprecated warning was disabled. After enabling there are a number of warnings relating to the CRT and the use of the non-secure versions of several functions. Defining _CRT_SECURE_NO_WARNINGS silences these warnings. Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavu: provide msvc implementation of attribute_deprecatedKirill Gavrilov2013-09-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu: disable av_uninit for clangPaul B Mahol2012-07-16
| | | | | | | | | | | | | | | | This silence bunch of useless warnings like: libavformat/mpeg.c:393:37: warning: variable 'dvdaudio_substream_type' is uninitialized when used within its own initialization [-Wuninitialized] Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cosmetics: Consistently use C-style comments with multiple inclusion guards anm: fix a few Doxygen comments misc typo and wording fixes attributes: add av_noreturn attributes: drop pointless define guards configure: do not disable av_always_inline with --enable-small flvdec: initial stream switch support avplay: fix write on freed memory for rawvideo snow: remove a VLA used for edge emulation x86: lavfi: fix gradfun/yadif build with mmx/sse disabled snow: remove the runs[] VLA. snow: Check mallocs at init flacdec: remove redundant setting of avctx->sample_fmt Conflicts: ffplay.c libavcodec/h264.c libavcodec/snow.c libavcodec/snow.h libavcodec/snowdec.c libavcodec/snowenc.c libavformat/flvdec.c libavutil/attributes.h tools/patcheck Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * attributes: add av_noreturnReinhard Tartler2012-07-03
| | | | | | | | | | | | | | Also use it in the declaration of the various exit_program implementations in avtools. inspired by a clang-scan report.
| * attributes: drop pointless define guardsReinhard Tartler2012-07-03
| | | | | | | | the av_-prefixed attributes must not be defined outside of this file
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dsputilenc_mmx: split assignment of ff_sse16_sse2 to SSE2 section. dnxhdenc: add space between function argument type and comment. x86: fmtconvert: add special asm for float_to_int16_interleave_misc_* attributes: Add a definition of av_always_inline for MSVC cmdutils: Pass the actual chosen encoder to filter_codec_opts os_support: Add fallback definitions for stat flags os_support: Rename the poll fallback function to ff_poll network: Check for struct pollfd os_support: Don't compare a negative number against socket descriptors os_support: Include all the necessary headers for the win32 open function x86: vc1: fix and enable optimised loop filter Conflicts: cmdutils.c cmdutils.h ffmpeg.c ffplay.c libavformat/os_support.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * attributes: Add a definition of av_always_inline for MSVCRonald S. Bultje2012-06-30
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | attributes: move av_restrict fallback from internal to attributesMichael Niedermayer2012-06-17
| | | | | | | | | | | | This should fix --enable-hardcoded-tables Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | enable C99-external_inline for iclJ. Bohl2012-06-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | revert "extern inline" usageMichael Niedermayer2012-06-15
| | | | | | | | | | | | | | | | | | as it breaks ICC: libavcodec/libavcodec.a(snowenc.o): In function `encode_q_branch': /home/fate/x86_64-linux-gnu-icc-2011.4.191/src/libavcodec/snowenc.c:405: undefined reference to `ff_epzs_motion_search' /home/fate/x86_64-linux-gnu-icc-2011.4.191/src/libavcodec/snowenc.c:414: undefined reference to `ff_get_mb_score' Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | new attribute "extern inline" (fixing linker error with ff_get_mb_score and ↵J. Bohl2012-06-15
| | | | | | | | | | | | ff_get_mb_score) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil: add av_noreturnMichael Niedermayer2011-11-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/attributes: introduce AV_NOWARN_DEPRECATED.Nicolas George2011-09-25
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: doxygen: Consistently use '@' instead of '\' for Doxygen markup. Use av_printf_format to check the usage of printf style functions Add av_printf_format, for marking printf style format strings and their parameters ARM: enable thumb for Cortex-M* CPUs nsvdec: Propagate error values instead of returning 0 in nsv_read_header(). build: remove SRC_PATH_BARE variable build: move basic rules and variables to main Makefile build: move special targets to end of main Makefile lavdev: improve feedback in case of invalid frame rate/size vfwcap: prefer "framerate_q" over "fps" in vfw_read_header() v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters() fbdev: prefer "framerate_q" over "fps" in device context bktr: prefer "framerate" over "fps" for grab_read_header() ALSA: implement channel layout for playback. alsa: support unsigned variants of already supported signed formats. alsa: add support for more formats. ARM: allow building in Thumb2 mode Conflicts: common.mak doc/APIchanges libavcodec/vdpau.h libavdevice/alsa-audio-common.c libavdevice/fbdev.c libavdevice/libdc1394.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add av_printf_format, for marking printf style format strings and their ↵Martin Storsjö2011-06-23
| | | | | | | | | | | | parameters Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * newdev/master: avio: make udp_set_remote_url/get_local_port internal. asfdec: also subtract preroll when reading simple index object matroskaenc: remove a variable that's unused after bc17bd9. avio: cosmetics - nicer vertical alignment. Remove unnecessary icc version checks Disable 'attribute "foo" ignored' warnings from icc rtsp: Don't use a locale dependent format string Add xd55 codec tag for XDCAM HD422 720p25 CBR files. configure: get libavcodec version from new version.h header lavc: move the version macros to a new installed header. matroskaenc: simplify get_aac_sample_rates by using ff_mpeg4audio_get_config Do not use format string "%0.3f" for RTSP Range field. Add apply_window_int16() to DSPContext with x86-optimized versions and use it in the ac3_fixed encoder. Document usage of import libraries created by dlltool configure: Set the correct lib target for arm/wince dlltool fate: simplify regression-funcs.sh fate: add support for multithread testing Conflicts: libavformat/rtspdec.c libavutil/attributes.h libavutil/internal.h libavutil/mem.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove unnecessary icc version checksMans Rullgard2011-03-23
| | | | | | | | | | | | | | | | With unknown attribute warnings disabled, these checks are no longer needed. Removing them improves readability while having no effect on generated code. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Rename attribute_used to av_used and move it to attributes.hMans Rullgard2011-01-31
| | | | | | | | | | | | This is consistent with most of the other attribute macros. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Use macro __INTEL_COMPILER instead of __ICC.Carl Eugen Hoyos2011-03-02
| | | | | | | | | | | | __ICC is not supported on all platforms, this is an Intel documentation bug that is supposed to be fixed in a future release. (Intel issue 612289)
* | Rename attribute_used to av_used and move it to attributes.hMans Rullgard2011-01-31
|/ | | | | | | This is consistent with most of the other attribute macros. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 365e3c7878e4e821d5dec922d2d51f92ce13f926)
* Intel C compiler 12.0 does not suport these attributes: may_alias, ↵Carl Eugen Hoyos2010-11-10
| | | | | | force_align_arg_pointer and alloc_size. Originally committed as revision 25716 to svn://svn.ffmpeg.org/ffmpeg/trunk
* av_alias is an attribute and belongs to attributes.hMichael Niedermayer2010-05-13
| | | | | | | | | also attributes.h is public and external api and can thus not depend on configure tested compiler support thus this part is removed. A different solution must be found if this breaks for some compiler which i hope it does not. Originally committed as revision 23115 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* av_builtin_constant_p()Michael Niedermayer2010-04-02
| | | | Originally committed as revision 22770 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move gcc attribute macros to new header libavutil/attributes.hMåns Rullgård2010-03-08
Originally committed as revision 22346 to svn://svn.ffmpeg.org/ffmpeg/trunk