Skip to content

Conversation

@hhoffstaette
Copy link
Contributor

Clang-15 rightfully complains about function definitions without proper prototypes. Also replace handrolled memcpy/memset with standard C library calls.

Signed-off-by: Holger Hoffstätte [email protected]

Clang-15 rightfully complains about function definitions without proper
prototypes. Also replace handrolled memcpy/memset with standard
C library calls.

Signed-off-by: Holger Hoffstätte <[email protected]>
@hhoffstaette
Copy link
Contributor Author

In case you're wondering:

clang -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.   -g -O2 -MT md5c.o -MD -MP -MF .deps/md5c.Tpo -c -o md5c.o md5c.c
md5c.c:97:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
void MD5Init (context)
     ^
md5c.c:113:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
void MD5Update (context, input, inputLen)
     ^
md5c.c:155:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
void MD5Final (digest, context)
     ^
md5c.c:183:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
static void MD5Transform (state, block)
            ^
md5c.c:183:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
md5c.c:275:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
static void Encode (output, input, len)
            ^
md5c.c:275:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
md5c.c:293:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
static void Decode (output, input, len)
            ^
md5c.c:293:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
md5c.c:308:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
static void MD5_memcpy (output, input, len)
            ^
md5c.c:308:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
md5c.c:321:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
static void MD5_memset (output, value, len)
            ^
md5c.c:321:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]

I didn't even know it was possible to define functions this way.. ¯\_(ツ)_/¯

@hhoffstaette
Copy link
Contributor Author

hhoffstaette commented Sep 14, 2022

Btw I'm running this change on my server and it seems to work fine so far - just to make sure I didn't break anything. I mean..handrolled memcpy.. 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant