diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-28 14:20:24 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-28 14:20:24 +0000 |
commit | c4c642818581120120898ebc65215a0c318c6215 (patch) | |
tree | c270fa18323d872947cbd0db2f8ee3db7f9d93ce /src/core | |
parent | 9ef3044e982dda3dd71351a88da565d8131ed7c0 (diff) | |
download | irssi-c4c642818581120120898ebc65215a0c318c6215.zip |
fix compiler warnings
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3077 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/misc.c | 8 | ||||
-rw-r--r-- | src/core/misc.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/core/misc.c b/src/core/misc.c index 00f9d096..89f564d3 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -808,3 +808,11 @@ char *escape_string(const char *str) return ret; } + +int nearest_power(int num) +{ + int n = 1; + + while (n < num) n <<= 1; + return n; +} diff --git a/src/core/misc.h b/src/core/misc.h index 95946077..b18ad154 100644 --- a/src/core/misc.h +++ b/src/core/misc.h @@ -8,7 +8,7 @@ typedef void* (*FOREACH_FIND_FUNC) (void *item, void *data); typedef int (*COLUMN_LEN_FUNC)(void *data); -static inline int nearest_power(int num) +extern inline int nearest_power(int num) { int n = 1; |