aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/byte_source.c9
-rw-r--r--src/env.c7
-rw-r--r--src/n3.c9
-rw-r--r--src/node.c8
-rw-r--r--src/reader.c3
-rw-r--r--src/reader.h6
-rw-r--r--src/serd_internal.h15
-rw-r--r--src/serdi.c11
-rw-r--r--src/string.c6
-rw-r--r--src/uri.c7
-rw-r--r--src/writer.c7
-rw-r--r--tests/serd_test.c9
-rw-r--r--wscript8
13 files changed, 76 insertions, 29 deletions
diff --git a/src/byte_source.c b/src/byte_source.c
index 210e638e..329c89a3 100644
--- a/src/byte_source.c
+++ b/src/byte_source.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,6 +16,13 @@
#include "serd_internal.h"
+#include "serd/serd.h"
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
SerdStatus
serd_byte_source_page(SerdByteSource* source)
{
diff --git a/src/env.c b/src/env.c
index 55284b8c..09a91d6a 100644
--- a/src/env.c
+++ b/src/env.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2016 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -14,8 +14,11 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include "serd_internal.h"
+#include "serd/serd.h"
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/n3.c b/src/n3.c
index b9bc58cd..4b9ba7cf 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -14,18 +14,19 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "reader.h"
#include "serd_internal.h"
+#include "serd/serd.h"
+
#include <assert.h>
#include <ctype.h>
-#include <errno.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "reader.h"
-
#define TRY_THROW(exp) if (!(exp)) goto except;
#define TRY_RET(exp) if (!(exp)) return 0;
diff --git a/src/node.c b/src/node.c
index 6a2e352f..5a84237d 100644
--- a/src/node.c
+++ b/src/node.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2016 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,8 +16,14 @@
#include "serd_internal.h"
+#include "serd/serd.h"
+
+#include <assert.h>
#include <float.h>
#include <math.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/reader.c b/src/reader.c
index ef393ec7..aec37bea 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,6 @@
#include "reader.h"
#include "serd_internal.h"
-#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdint.h>
diff --git a/src/reader.h b/src/reader.h
index f7cdba02..adea6651 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,11 @@
#include "serd_internal.h"
+#include "serd/serd.h"
+
#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
static inline int
diff --git a/src/serd_internal.h b/src/serd_internal.h
index 9c58c151..dea98000 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -19,20 +19,21 @@
#define _POSIX_C_SOURCE 200809L /* for posix_memalign and posix_fadvise */
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "serd_config.h"
#include "serd/serd.h"
-#include "serd_config.h"
#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FILENO)
# include <fcntl.h>
#endif
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#define NS_XSD "http://www.w3.org/2001/XMLSchema#"
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
diff --git a/src/serdi.c b/src/serdi.c
index 03de46fd..802a6ff5 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -14,16 +14,19 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "serd_config.h"
#include "serd_internal.h"
+#include "serd/serd.h"
+
#ifdef _WIN32
#include <fcntl.h>
#include <io.h>
#endif
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
#include <string.h>
#define SERDI_ERROR(msg) fprintf(stderr, "serdi: " msg);
diff --git a/src/string.c b/src/string.c
index 0869bc23..b73cea03 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2016 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,11 @@
#include "serd_internal.h"
+#include "serd/serd.h"
+
#include <math.h>
+#include <stdint.h>
+#include <stdlib.h>
void
serd_free(void* ptr)
diff --git a/src/uri.c b/src/uri.c
index 7b016b8b..4528f0f4 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2014 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,6 +16,11 @@
#include "serd_internal.h"
+#include "serd/serd.h"
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/writer.c b/src/writer.c
index 33619d34..61b6b825 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,12 @@
#include "serd_internal.h"
+#include "serd/serd.h"
+
#include <assert.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 015d02d7..b2d862a1 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2017 David Robillard <http://drobilla.net>
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -16,16 +16,17 @@
#undef NDEBUG
+#include "serd/serd.h"
+
#include <assert.h>
#include <float.h>
#include <math.h>
-#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "serd/serd.h"
-
#define USTR(s) ((const uint8_t*)(s))
#ifndef INFINITY
diff --git a/wscript b/wscript
index b1d688ac..eb9495d0 100644
--- a/wscript
+++ b/wscript
@@ -44,6 +44,9 @@ def configure(conf):
conf.load('autowaf', cache=True)
autowaf.set_c_lang(conf, 'c99')
+ if Options.options.strict and not conf.env.MSVC_COMPILER:
+ conf.env.append_unique('CFLAGS', '-Wno-cast-align')
+
conf.env.update({
'BUILD_UTILS': not Options.options.no_utils,
'BUILD_SHARED': not Options.options.no_shared,
@@ -212,6 +215,11 @@ def lint(ctx):
"../src/*.c")
subprocess.call(cmd, cwd='build', shell=True)
+ try:
+ subprocess.call(["iwyu_tool.py", "-o", "clang", "-p", "build"])
+ except Exception:
+ Logs.warn("Failed to call iwyu_tool.py")
+
def amalgamate(ctx):
"builds single-file amalgamated source"