osmith submitted this change.

View Change

Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified
firmware(libosmocore): update function header

Update the function header to be the same as in
target/firmware/include/string.h, so it compiles successfully with
GCC 14.2. Otherwise:

lib/strcmp.c:5:1: error: return type defaults to 'int' [-Wimplicit-int]
5 | strcmp(s1, s2)
| ^~~~~~

Change-Id: Ic601d84c3366d9aec661663c80ba9d7586510d63
---
M src/target/firmware/lib/strcmp.c
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/target/firmware/lib/strcmp.c b/src/target/firmware/lib/strcmp.c
index 9a7fa81..c098d6e 100644
--- a/src/target/firmware/lib/strcmp.c
+++ b/src/target/firmware/lib/strcmp.c
@@ -2,8 +2,7 @@
* Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
*/

-strcmp(s1, s2)
- register char *s1, *s2;
+int strcmp(const char *s1, const char *s2)
{
while (*s1 == *s2++)
if (*s1++=='\0')

To view, visit change 41191. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ic601d84c3366d9aec661663c80ba9d7586510d63
Gerrit-Change-Number: 41191
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>