Просмотр исходного кода

Fix modernize-deprecated-headers errors in csync tests

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens 5 лет назад
Родитель
Сommit
f323f8b4bc

+ 3 - 3
test/csync/csync_tests/check_csync_exclude.cpp

@@ -18,10 +18,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
  */
 #include "config_csync.h"
 #include "config_csync.h"
-#include <string.h>
-#include <time.h>
+#include <cstring>
+#include <ctime>
 #include <sys/time.h>
 #include <sys/time.h>
-#include <stdio.h>
+#include <cstdio>
 
 
 #define CSYNC_TEST 1
 #define CSYNC_TEST 1
 #include "csync_exclude.cpp"
 #include "csync_exclude.cpp"

+ 1 - 1
test/csync/csync_tests/check_csync_misc.cpp

@@ -18,7 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
  */
 #include "common/utility.h"
 #include "common/utility.h"
-#include <stdlib.h>
+#include <cstdlib>
 #include "torture.h"
 #include "torture.h"
 
 
 static void check_csync_normalize_etag(void **state)
 static void check_csync_normalize_etag(void **state)

+ 1 - 1
test/csync/encoding_tests/check_encoding.cpp

@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
  */
-#include <stdio.h>
+#include <cstdio>
 #include "c_string.h"
 #include "c_string.h"
 #include "c_utf8.h"
 #include "c_utf8.h"
 #include "common/filesystembase.h"
 #include "common/filesystembase.h"

+ 3 - 3
test/csync/torture.h

@@ -24,9 +24,9 @@
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-#include <stdarg.h>
-#include <stddef.h>
-#include <setjmp.h>
+#include <stdarg.h> // NOLINT sometimes compiled in C mode
+#include <stddef.h> // NOLINT sometimes compiled in C mode
+#include <setjmp.h> // NOLINT sometimes compiled in C mode
 
 
 #include <cmocka.h>
 #include <cmocka.h>
 
 

+ 2 - 2
test/csync/vio_tests/check_vio.cpp

@@ -20,8 +20,8 @@
 #include <sys/types.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <fcntl.h>
-#include <string.h>
-#include <errno.h>
+#include <cstring>
+#include <cerrno>
 
 
 #include "csync_private.h"
 #include "csync_private.h"
 #include "std/c_utf8.h"
 #include "std/c_utf8.h"

+ 3 - 3
test/csync/vio_tests/check_vio_ext.cpp

@@ -20,9 +20,9 @@
 #include <sys/types.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
+#include <cstring>
+#include <cerrno>
+#include <cstdio>
 
 
 #include "csync_private.h"
 #include "csync_private.h"
 #include "std/c_utf8.h"
 #include "std/c_utf8.h"