summaryrefslogtreecommitdiff
path: root/random/gnupg-rmd160.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2015-12-29 23:12:58 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-12-29 23:19:44 +0100
commitf5490b490c549efa89eefb6deefdc7341aa6a913 (patch)
tree8d037f950d37621e4f6a144cf71a8bc612f9a51e /random/gnupg-rmd160.c
parent87673d93fd87c3fda97e91842c3d7d326a30ef8c (diff)
fix compiler warnings in hurd/random
random: Fix compiler warnings. * random/gnupg-random.c: Use byte instead of char. * random/gnupg-rmd.h (rmd160_mixblock): Use byte instead of char. * random/gnupg-rmd.c (rmd160_mixblock): Likewise. * random/gnupg-rmd.c: Place #ifdef __HURD__ earlier to avoid warnings.
Diffstat (limited to 'random/gnupg-rmd160.c')
-rw-r--r--random/gnupg-rmd160.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/random/gnupg-rmd160.c b/random/gnupg-rmd160.c
index 66107685..8f4207b3 100644
--- a/random/gnupg-rmd160.c
+++ b/random/gnupg-rmd160.c
@@ -458,9 +458,9 @@ rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen)
* Returns: 16 bytes in buffer with the mixed contentes of buffer.
*/
void
-rmd160_mixblock( RMD160_CONTEXT *hd, char *buffer )
+rmd160_mixblock( RMD160_CONTEXT *hd, byte *buffer )
{
- char *p = buffer;
+ byte *p = buffer;
transform( hd, buffer );
#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
X(0);
@@ -536,12 +536,6 @@ rmd160_final( RMD160_CONTEXT *hd )
#undef X
}
-static byte *
-rmd160_read( RMD160_CONTEXT *hd )
-{
- return hd->buf;
-}
-
/****************
@@ -560,6 +554,14 @@ rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length )
}
+#ifndef __HURD__
+
+static byte *
+rmd160_read( RMD160_CONTEXT *hd )
+{
+ return hd->buf;
+}
+
/****************
* Return some information about the algorithm. We need algo here to
* distinguish different flavors of the algorithm.
@@ -643,9 +645,6 @@ gnupgext_enum_func( int what, int *sequence, int *class, int *vers )
return ret;
}
-
-
-#ifndef __HURD__
#ifndef IS_MODULE
void
rmd160_constructor(void)