Commit 1c1d9a70 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Enable modernize-deprecated-headers

parent 5713d0da
Pipeline #84118 passed with stages
in 6 minutes and 23 seconds
......@@ -40,7 +40,7 @@ build_clang_libcpp:
script:
- git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
- mkdir -p build && cd build
- CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
- CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" ..
- ninja
- ctest --output-on-failure
......
......@@ -263,7 +263,6 @@ if(ENABLE_ZLIB)
endif()
if (NSS3_FOUND)
add_definitions(${NSS3_CFLAGS})
set(ENABLE_NSS3 ON)
endif()
if(JPEG_FOUND)
......@@ -461,6 +460,7 @@ if (ENABLE_NSS3)
)
if(${CMAKE_VERSION} VERSION_LESS "3.6.0")
set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES})
include_directories(SYSTEM ${NSS3_INCLUDE_DIRS})
else()
set(poppler_LIBS ${poppler_LIBS} PkgConfig::NSS3)
endif()
......
......@@ -32,7 +32,7 @@
#include "Error.h"
#include "CharTypes.h"
#include <stdarg.h>
#include <cstdarg>
class GooString;
class PDFRectangle;
......
......@@ -26,8 +26,8 @@
#include <config.h>
#include <stdio.h>
#include <limits.h>
#include <cstdio>
#include <climits>
#include "goo/gfile.h"
#include "goo/gmem.h"
#include "poppler/Error.h"
......
......@@ -23,7 +23,7 @@
#include <config.h>
#include <stdlib.h>
#include <cstdlib>
#include "FoFiEncodings.h"
//------------------------------------------------------------------------
......
......@@ -23,9 +23,9 @@
//
//========================================================================
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <cstdio>
#include <cstring>
#include <climits>
#include "goo/gfile.h"
#include "goo/GooCheckedOps.h"
#include "FoFiIdentifier.h"
......
......@@ -32,9 +32,9 @@
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <algorithm>
#include "goo/gmem.h"
#include "goo/GooLikely.h"
......
......@@ -28,7 +28,7 @@
#ifndef FOFITRUETYPE_H
#define FOFITRUETYPE_H
#include "stddef.h"
#include <cstddef>
#include <unordered_map>
#include <string>
#include "FoFiBase.h"
......
......@@ -27,9 +27,9 @@
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <cstdlib>
#include <cstring>
#include <climits>
#include "goo/glibc.h"
#include "goo/gmem.h"
#include "goo/GooLikely.h"
......
......@@ -26,9 +26,9 @@
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include "goo/gmem.h"
#include "goo/gstrtod.h"
#include "goo/GooLikely.h"
......@@ -2673,7 +2673,7 @@ int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) const {
x = 0;
for (i = 0; i < n; ++i) {
int y;
if (unlikely(isinf(ops[i].num))) {
if (unlikely(std::isinf(ops[i].num))) {
return i;
}
if (checkedAdd(x, (int)ops[i].num, &y)) {
......
include_directories(
SYSTEM
${GTK3_INCLUDE_DIRS}
)
......
......@@ -17,7 +17,7 @@
*/
#include "config.h"
#include <errno.h>
#include <cerrno>
#include <goo/gfile.h>
......
......@@ -22,7 +22,7 @@
*/
#include "config.h"
#include <string.h>
#include <cstring>
#ifndef __GI_SCANNER__
#include <memory>
......
......@@ -19,7 +19,7 @@
#include "config.h"
#include <errno.h>
#include <cerrno>
#include <goo/gfile.h>
......
......@@ -17,7 +17,7 @@
*/
#include "config.h"
#include <math.h>
#include <cmath>
#ifndef __GI_SCANNER__
#include <GlobalParams.h>
......
......@@ -25,7 +25,7 @@
#include <StructElement.h>
#include <GlobalParams.h>
#include <UnicodeMap.h>
#include <math.h>
#include <cmath>
#endif /* !__GI_SCANNER__ */
#include "poppler.h"
......
......@@ -14,7 +14,7 @@
#include <config.h>
#include "GooTimer.h"
#include <string.h>
#include <cstring>
#define USEC_PER_SEC 1000000
......
......@@ -15,7 +15,7 @@
#ifndef IMGWRITER_H
#define IMGWRITER_H
#include <stdio.h>
#include <cstdio>
class ImgWriter
{
......
......@@ -19,8 +19,8 @@
#ifdef ENABLE_LIBPNG
#include <zlib.h>
#include <stdlib.h>
#include <string.h>
#include <cstdlib>
#include <cstring>
#include "poppler/Error.h"
#include "goo/gmem.h"
......
......@@ -16,7 +16,7 @@
#ifdef ENABLE_LIBTIFF
#include <string.h>
#include <cstring>
#ifdef _WIN32
#include <io.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment