mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 11:04:20 +00:00

Improved support for W=1 compilation flag by solving missing-prototypes and old-style-definition warnings. The libraries are compiling with warnings (which turn into errors with the Werror flag). Outside of libraries, some warnings cannot be fixed without heavy structural changes. Change-Id: I1668cf99123ac4195c2a6a1d48945f7a64c67f16 Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
25 lines
424 B
C
25 lines
424 B
C
/*
|
|
* Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
|
|
int memcmp(const void *s1, const void *s2, size_t len)
|
|
{
|
|
const unsigned char *s = s1;
|
|
const unsigned char *d = s2;
|
|
unsigned char sc;
|
|
unsigned char dc;
|
|
|
|
while (len--) {
|
|
sc = *s++;
|
|
dc = *d++;
|
|
if (sc - dc)
|
|
return (sc - dc);
|
|
}
|
|
|
|
return 0;
|
|
}
|