Peter Meerwald
87d188b46c
macro: Add macro PA_UNUSED
...
the macro PA_UNUSED may be used to suppress a warning when a variable
is not used, or assigned and never used; this typically happens
when the only use of the variable is within an assert() that can
be optimized away (i.e. with NDEBUG set)
has an effect with GCC only
v2: (thanks to Alexander Patrakov)
* fix patch subject/description
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-11-17 13:24:43 +01:00
Peter Meerwald
094de7f024
macro: Abort() when pa_assert_not_reached() even for NDEBUG
...
fixes many warnings when compiling with NDEBUG, such as
CC pulse/libpulse_la-channelmap.lo
pulse/channelmap.c: In function 'pa_channel_map_init_auto':
pulse/channelmap.c:397:1: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-11-17 13:24:38 +01:00
poljar (Damir Jelić)
b224716f33
macro: Remove unneeded typedef for pa_bool_t.
2013-07-04 12:26:02 +03:00
poljar (Damir Jelić)
d806b19714
Remove pa_bool_t and replace it with bool.
...
commands used for this (executed from the pulseaudio/src directory):
find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
-a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
-a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
-exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
-e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;
and:
sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
-e '181,194!s/\bTRUE\b/true/' -e \
'181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
Arun Raghavan
dbe8f2e595
macro: typedef pa_bool_t to bool instead of _Bool
...
They're functionally equivalent, and the former lets the header be
included in C++ as well.
2011-10-17 16:42:59 +05:30
Maarten Bosmans
9133c6c935
Make gcc --std=c99 happy
...
We're now more or less C99 compliant
2011-09-03 12:17:28 +02:00
Maarten Bosmans
dd9265ac78
Remove unnecessary #includes
2011-06-22 23:12:20 +01:00
Lennart Poettering
56f217f3f8
macro: introduce PA_INT_TYPE_MIN, PA_INT_TYPE_MAX, PA_INT_TYPE_SIGNED macros
2009-09-18 04:14:37 +02:00
Wim Taymans
27bfb7628c
macro: add macro to align variables
2009-08-27 10:44:53 +02:00
Lennart Poettering
827ae07c1e
macro: add PA_CLIP_SUB() for saturated subtraction
2009-08-26 01:41:34 +02:00
Lennart Poettering
2838b78e59
macro: extend comments a bit
2009-08-19 01:03:09 +02:00
Lennart Poettering
8f928b2e57
macro: simplify page/word alignment macros a bit
2009-08-17 19:17:10 +02:00
Lennart Poettering
fe3a21f6a5
macro: add PA_ROUND_UP/PA_ROUND_DOWN macros
2009-08-17 19:15:33 +02:00
Lennart Poettering
003e03d233
macro: include string.h because we need it for memset
2009-05-14 01:23:12 +02:00
Lennart Poettering
92a6141888
macro: add macros for initializing memory
2009-05-08 02:04:33 +02:00
Lennart Poettering
bd0e4ceb85
macro: make pa_page_align roung up instead of down
2009-04-29 01:52:28 +02:00
Lennart Poettering
68f3ca9831
macro: add new macro pa_align_ptr()
2009-04-29 01:52:11 +02:00
Lennart Poettering
52dcb950ef
add pa_assert_cc() for compile time assertions
2009-03-23 21:03:52 +01:00
Lennart Poettering
bd3154a861
introduce pa_assert_fp() for fast path assertions
2009-03-20 13:29:42 +01:00
Colin Guthrie
86dee05aec
Use LGPL 2.1 on all files previously using LGPL 2
2009-03-03 20:23:02 +00:00
Lennart Poettering
b092f2e0f8
use uintpr_t when casting between pointers and integers
2009-02-02 00:20:05 +01:00
Lennart Poettering
c4b346259f
make the debug trap macro a proper macro in macro.h
2008-10-21 22:04:22 +02:00
Lennart Poettering
f92a814118
include log.h near the end so that macro.h can be included in log.h and defines pa_bool_t properly
2008-10-21 18:40:01 +02:00
Lennart Poettering
7fecb2340e
convert argument to boolean int in PA_UNLIKELY, too
2008-10-21 18:27:25 +02:00
Lennart Poettering
ea15ca9862
PA_WARN_REFERENCE works only for ELF targets
2008-10-01 14:49:00 +02:00
Lennart Poettering
8ae83d618e
get rid of svn $ keywords
2008-06-18 23:23:21 +03:00
Lennart Poettering
045c1d602d
merge glitch-free branch back into trunk
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-15 23:34:41 +00:00
Lennart Poettering
b39da92935
merge r2194 from prepare-0.9.10
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2209 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-31 22:12:55 +00:00
Lennart Poettering
e043eaad94
add new function pa_strnull() to simplify passing null strings to non-linux printf()
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2045 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-11 22:59:34 +00:00
Lennart Poettering
01490319d3
remove PA_CLAMP_LIKELY macro because it doesn't really make sense.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2039 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 14:19:40 +00:00
Lennart Poettering
3c17c7d442
fix CLAMP_LIKELY/UNLIKELY definition
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2036 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 02:12:09 +00:00
Lennart Poettering
cb66762d6d
add PA_CLAMP_LIKELY and PA_CLAMP_UNLIKELY macros
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2033 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 01:29:50 +00:00
Lennart Poettering
a67c21f093
merge 'lennart' branch back into trunk.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00