summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorSergey Koshechkin <serge.koshechkin@gmail.com>2015-11-17 15:14:12 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-18 08:30:08 +0100
commit916c20fb356c3486bb0ae928ed452a4b58f4e408 (patch)
tree81cd145ebf0a89ec15ca4e68c163f954984484e4 /crypto
parentec871a7370fa2eedd8821c33a2982358e080b2e4 (diff)
downloadbarebox-916c20fb356c3486bb0ae928ed452a4b58f4e408.tar.gz
barebox-916c20fb356c3486bb0ae928ed452a4b58f4e408.tar.xz
crypto: crc32: fix warnings: no previous prototype for 'crc32', 'crc32_no_comp', 'file_crc'
Signed-off-by: Sergey Koshechkin <serge.koshechkin@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/crc32.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/crc32.c b/crypto/crc32.c
index e7b1bd76b6..58637bd770 100644
--- a/crypto/crc32.c
+++ b/crypto/crc32.c
@@ -16,6 +16,9 @@
#include <malloc.h>
#include <linux/ctype.h>
#include <errno.h>
+#define STATIC
+#else
+#define STATIC static inline
#endif
#ifdef CONFIG_DYNAMIC_CRC_TABLE
@@ -138,7 +141,7 @@ static const ulong crc_table[256] = {
#define DO8(buf) DO4(buf); DO4(buf);
/* ========================================================================= */
-uint32_t crc32(uint32_t crc, const void *_buf, unsigned int len)
+STATIC uint32_t crc32(uint32_t crc, const void *_buf, unsigned int len)
{
const unsigned char *buf = _buf;
@@ -164,7 +167,7 @@ EXPORT_SYMBOL(crc32);
/* No ones complement version. JFFS2 (and other things ?)
* don't use ones compliment in their CRC calculations.
*/
-uint32_t crc32_no_comp(uint32_t crc, const void *_buf, unsigned int len)
+STATIC uint32_t crc32_no_comp(uint32_t crc, const void *_buf, unsigned int len)
{
const unsigned char *buf = _buf;
@@ -184,7 +187,7 @@ uint32_t crc32_no_comp(uint32_t crc, const void *_buf, unsigned int len)
return crc;
}
-int file_crc(char *filename, ulong start, ulong size, ulong *crc,
+STATIC int file_crc(char *filename, ulong start, ulong size, ulong *crc,
ulong *total)
{
int fd, now;