History

avutil/utils: check that size_t is unsigned

ANSI/ISO C guarantee this, yet there is evidence that there exist platforms where its not so. See: http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_30.html

Michael Niedermayer committed 13 years ago

Commit f3d06421 parent c78a4161 file · +2 −0Browse files

Unified · Split

libavutil/utils.c+2−0
@@ -40,6 +40,8 @@ unsigned avutil_version(void) · 39 unmodified lines
40 av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);40 av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
41 av_assert0(HAVE_MMX2 == HAVE_MMXEXT);41 av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
42 42
43 av_assert0(((size_t)-1) > 0); // C gurantees this but if false on a platform we care about revert at least b284e1ffe343d6697fb950d1ee517bafda8a9844
44
43 if (av_sat_dadd32(1, 2) != 5) {45 if (av_sat_dadd32(1, 2) != 5) {
44 av_log(NULL, AV_LOG_FATAL, "Libavutil has been build with a broken binutils, please upgrade binutils and rebuild\n");46 av_log(NULL, AV_LOG_FATAL, "Libavutil has been build with a broken binutils, please upgrade binutils and rebuild\n");
45 abort();47 abort();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t