Skip to content

Commit 4108ab9

Browse files
authored
Merge pull request #7 from Simverge/github-6_address-coverity-faults
Address initial Coverity Scan faults (issue #6)
2 parents 1440fbd + 5cdb1e6 commit 4108ab9

15 files changed

+769
-248
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
tests/pdal-stats.las
33
tests/data/*.json
44
tests/pdal/test_pdalc_*.c
5+
!tests/pdal/test_pdalc_utils.c
56

67
# Ignore doxygen docs
78
/doc/doxygen
89
/doc/Doxyfile
910

1011
# Select VS Code configurations
12+
.vscode/ipch/**
1113
.vscode/settings.json
1214
.vscode/c_cpp_properties.json
1315

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ before_install:
2222
- docker pull simverge/pdalc-build-deps:$DISTRO
2323

2424
script:
25+
- if [ "$SCAN" = "sonarcloud" ]; then git fetch --unshallow --tags --quiet; fi
2526
- chmod u+x $TRAVIS_BUILD_DIR/tests/travis/script.sh
2627
- docker run -e SCAN -e COVERITY_EMAIL -e COVERITY_TOKEN -e TRAVIS_COMMIT -e TRAVIS_BRANCH -e BUILD_TYPE -e DISTRO -v $TRAVIS_BUILD_DIR:/pdalc -t simverge/pdalc-build-deps:$DISTRO /pdalc/tests/travis/script.sh
2728
- if [ "$SCAN" = "sonarcloud" ]; then sonar-scanner; fi

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
pdal-c: PDAL C API
22
==================
33

4+
[//]: # (@cond Hide build status from Doxygen)
5+
46
[![Build Status](https://travis-ci.com/Simverge/pdal-c.svg?branch=master)](https://travis-ci.com/Simverge/pdal-c)
57
[![Coverity Scan](https://scan.coverity.com/projects/17631/badge.svg)](https://scan.coverity.com/projects/simverge-pdal-c)
68
[![SonarCloud](https://sonarcloud.io/api/project_badges/measure?project=Simverge_pdal-c&metric=alert_status)](https://sonarcloud.io/dashboard?id=Simverge_pdal-c)
79

10+
[//]: # (@endcond)
811

912
*pdal-c* is a C API for the Point Data Abstraction Library ([PDAL](http:/github.com/PDAL/PDAL))
1013
and is compatible with PDAL 1.7 and later.

source/pdal/pdalc_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace capi
4646
extern "C"
4747
{
4848
#else
49-
#include <stdbool.h>
49+
#include <stddef.h> // for size_t
5050
#endif
5151
/**
5252
* Retrieves the path to the GDAL data directory.

source/pdal/pdalc_dimtype.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ namespace capi
4545
{
4646
extern "C"
4747
{
48+
#else
49+
#include <stddef.h> // for size_t
4850
#endif
4951
/**
5052
* Returns the number of elements in a dimension type list.

source/pdal/pdalc_pipeline.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern "C"
4747
{
4848
#else
4949
#include <stdbool.h> // for bool
50+
#include <stddef.h> // for size_t
5051
#include <stdint.h> // for int64_t
5152
#endif /* __cplusplus */
5253

source/pdal/pdalc_pointlayout.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ namespace capi
4646

4747
extern "C"
4848
{
49+
#else
50+
#include <stddef.h> // for size_t
4951
#endif
5052
/**
5153
* Returns the list of dimension types used by the provided `layout`.

source/pdal/pdalc_pointview.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern "C"
4747
{
4848
#else
4949
#include <stdbool.h> // for bool
50+
#include <stddef.h> // for size_t
5051
#include <stdint.h> // for uint64_t
5152
#endif
5253
/**

tests/pdal/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ set(CONFIGS )
77
set(SOURCES
88
main.c
99
test_pdalc_config.c
10+
test_pdalc_utils.c
11+
)
12+
13+
set(HEADERS
14+
test_pdalc_utils.h
1015
)
1116

12-
set(HEADERS )
1317
set(DEPENDENCIES
1418
${PDAL_LIBRARIES}
1519
pdalc

0 commit comments

Comments
 (0)