Skip to content
Snippets Groups Projects
Commit 15effd64 authored by Sean McBride's avatar Sean McBride
Browse files

MD5: Fix Clang 13 Wnull-pointer-subtraction warning

parent 2c4a8330
No related branches found
No related tags found
1 merge request!231MD5: Fix Clang 13 Wnull-pointer-subtraction warning
......@@ -10,6 +10,7 @@
#endif
#include <stddef.h> /* size_t */
#include <stdint.h> /* uintptr_t */
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memcpy, strlen */
......@@ -202,7 +203,7 @@ static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
* On little-endian machines, we can process properly aligned
* data without copying it.
*/
if (!((data - (const md5_byte_t*)0) & 3)) {
if (!((uintptr_t)data & 3)) {
/* data are properly aligned */
X = (const md5_word_t*)data;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment