Skip to contentSkip to conversation

Replace deprecated <strings.h> with <string.h>

PATCH Superseded Jozef Pupava 2 participants 2 messages Mar 25, 2020

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Replace deprecated <strings.h> with <string.h>

I guess this won't really solve anything, just the issue.

Closes #521
---
 testcases/kernel/containers/share/ns_create.c                           | 2 +-
 testcases/kernel/fs/fsx-linux/fsx-linux.c                               | 2 +-
 .../open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c     | 2 +-
 .../open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/containers/share/ns_create.c +1 -1
index 1d0339e71..4a4007c3a 100644
@@ -30,7 +30,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
-#include <strings.h>
+#include <string.h>
 #include <errno.h>
 #include "test.h"
 #include "lapi/namespaces_constants.h"
testcases/kernel/fs/fsx-linux/fsx-linux.c +1 -1
index 02f3eb827..4a20f4da6 100644
@@ -43,7 +43,7 @@
 #include <sys/param.h>
 #include <limits.h>
 #include <time.h>
-#include <strings.h>
+#include <string.h>
 #include <sys/time.h>
 #endif
 #include <fcntl.h>
testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c +1 -1
index dd42bbd91..97bdbff5d 100644
@@ -20,7 +20,7 @@
 #endif
 #include <semaphore.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 #include "posixtest.h"
testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c +1 -1
index 79de0af7f..da2cd3084 100644
@@ -21,7 +21,7 @@
 #endif
 #include <semaphore.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 #include "posixtest.h"
Signature · 1 line
2.16.4
#1 lore raw

PATCH 1/1 Replace deprecated <strings.h> with <string.h>

Hi!

Quoted 15 lines
Closes #521
---
 testcases/kernel/containers/share/ns_create.c                           | 2 +-
 testcases/kernel/fs/fsx-linux/fsx-linux.c                               | 2 +-
 .../open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c     | 2 +-
 .../open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/containers/share/ns_create.c +0 -0
index 1d0339e71..4a4007c3a 100644

testcases/kernel/containers/share/ns_create.c line 33

Quoted 5 lines
testcases/kernel/containers/share/ns_create.c +1 -1
@@ -30,7 +30,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
-#include <strings.h>
+#include <string.h>

The string.h include is already there, so we just need to delete it here.

Quoted 34 lines
testcases/kernel/containers/share/ns_create.c +0 -0
 #include <errno.h>
 #include "test.h"
 #include "lapi/namespaces_constants.h"
testcases/kernel/fs/fsx-linux/fsx-linux.c +1 -1
index 02f3eb827..4a20f4da6 100644
@@ -43,7 +43,7 @@
 #include <sys/param.h>
 #include <limits.h>
 #include <time.h>
-#include <strings.h>
+#include <string.h>
 #include <sys/time.h>
 #endif
 #include <fcntl.h>
testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c +1 -1
index dd42bbd91..97bdbff5d 100644
@@ -20,7 +20,7 @@
 #endif
 #include <semaphore.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 #include "posixtest.h"
testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c +0 -0
index 79de0af7f..da2cd3084 100644

testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c line 27

Quoted 8 lines
testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c +1 -1
@@ -21,7 +21,7 @@
 #endif
 #include <semaphore.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 #include "posixtest.h"

As far as I can tell there are no string functions used in the sem_timedwait() tests, so we can as well just remove the include in these two.

Signature · 2 lines
Cyril Hrubis
[email protected]