diff --git a/examples/diffusionC.c b/examples/diffusionC.c index 5e8404564..3a2ac6ab4 100644 --- a/examples/diffusionC.c +++ b/examples/diffusionC.c @@ -216,7 +216,7 @@ error(const double* u, const constants* c, double t) } static int -usage() +usage(void) { fprintf(stderr, "Usage: diffusionC [options]\n"); fprintf(stderr, "Options:\n"); diff --git a/examples/iteratorC.c b/examples/iteratorC.c index 8106c493a..93ef47259 100644 --- a/examples/iteratorC.c +++ b/examples/iteratorC.c @@ -30,7 +30,7 @@ void print3(cfp_iter1d begin, cfp_iter1d end) printf("%g\n", _.reference.get(_.iterator.ref(p))); } -int main() +int main(void) { const cfp_array1d_api _1d = cfp.array1d; const cfp_array2d_api _2d = cfp.array2d; diff --git a/include/zfp.h b/include/zfp.h index 9db4a3873..2d096cceb 100644 --- a/include/zfp.h +++ b/include/zfp.h @@ -335,7 +335,7 @@ zfp_stream_set_omp_chunk_size( /* unspecified configuration */ zfp_config /* compression mode and parameter settings */ -zfp_config_none(); +zfp_config_none(void); /* fixed-rate configuration */ zfp_config /* compression mode and parameter settings */ @@ -358,7 +358,7 @@ zfp_config_accuracy( /* reversible (lossless) configuration */ zfp_config /* compression mode and parameter settings */ -zfp_config_reversible(); +zfp_config_reversible(void); /* expert configuration */ zfp_config /* compression mode and parameter settings */ @@ -373,7 +373,7 @@ zfp_config_expert( /* allocate field struct */ zfp_field* /* pointer to default initialized field */ -zfp_field_alloc(); +zfp_field_alloc(void); /* allocate metadata for 1D field f[nx] */ zfp_field* /* allocated field metadata */ diff --git a/include/zfp/bitstream.h b/include/zfp/bitstream.h index 85922aadb..44598227e 100644 --- a/include/zfp/bitstream.h +++ b/include/zfp/bitstream.h @@ -34,7 +34,7 @@ void stream_close(bitstream* stream); bitstream* stream_clone(const bitstream* stream); /* word size in bits (equal to stream_word_bits) */ -bitstream_count stream_alignment(); +bitstream_count stream_alignment(void); /* pointer to beginning of stream */ void* stream_data(const bitstream* stream); diff --git a/include/zfp/bitstream.inl b/include/zfp/bitstream.inl index 987f5a42a..80294ee9e 100644 --- a/include/zfp/bitstream.inl +++ b/include/zfp/bitstream.inl @@ -171,7 +171,7 @@ stream_write_word(bitstream* s, bitstream_word value) /* word size in bits (equals bitstream_word_bits) */ inline_ bitstream_count -stream_alignment() +stream_alignment(void) { return wsize; } diff --git a/include/zfp/internal/cfp/array1d.h b/include/zfp/internal/cfp/array1d.h index 65bddff3b..fb20d3a77 100644 --- a/include/zfp/internal/cfp/array1d.h +++ b/include/zfp/internal/cfp/array1d.h @@ -96,7 +96,7 @@ typedef struct { } cfp_header1d_api; typedef struct { - cfp_array1d (*ctor_default)(); + cfp_array1d (*ctor_default)(void); cfp_array1d (*ctor)(size_t n, double rate, const double* p, size_t cache_size); cfp_array1d (*ctor_copy)(const cfp_array1d src); cfp_array1d (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array1f.h b/include/zfp/internal/cfp/array1f.h index 3f4d21e4f..6ca593d09 100644 --- a/include/zfp/internal/cfp/array1f.h +++ b/include/zfp/internal/cfp/array1f.h @@ -96,7 +96,7 @@ typedef struct { } cfp_header1f_api; typedef struct { - cfp_array1f (*ctor_default)(); + cfp_array1f (*ctor_default)(void); cfp_array1f (*ctor)(size_t n, double rate, const float* p, size_t cache_size); cfp_array1f (*ctor_copy)(const cfp_array1f src); cfp_array1f (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array2d.h b/include/zfp/internal/cfp/array2d.h index 9b070987d..b0e078af3 100644 --- a/include/zfp/internal/cfp/array2d.h +++ b/include/zfp/internal/cfp/array2d.h @@ -97,7 +97,7 @@ typedef struct { } cfp_header2d_api; typedef struct { - cfp_array2d (*ctor_default)(); + cfp_array2d (*ctor_default)(void); cfp_array2d (*ctor)(size_t nx, size_t ny, double rate, const double* p, size_t cache_size); cfp_array2d (*ctor_copy)(const cfp_array2d src); cfp_array2d (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array2f.h b/include/zfp/internal/cfp/array2f.h index 85bf584e7..0137b6094 100644 --- a/include/zfp/internal/cfp/array2f.h +++ b/include/zfp/internal/cfp/array2f.h @@ -97,7 +97,7 @@ typedef struct { } cfp_header2f_api; typedef struct { - cfp_array2f (*ctor_default)(); + cfp_array2f (*ctor_default)(void); cfp_array2f (*ctor)(size_t nx, size_t ny, double rate, const float* p, size_t cache_size); cfp_array2f (*ctor_copy)(const cfp_array2f src); cfp_array2f (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array3d.h b/include/zfp/internal/cfp/array3d.h index c3c337f6b..9c4a654a1 100644 --- a/include/zfp/internal/cfp/array3d.h +++ b/include/zfp/internal/cfp/array3d.h @@ -98,7 +98,7 @@ typedef struct { } cfp_header3d_api; typedef struct { - cfp_array3d (*ctor_default)(); + cfp_array3d (*ctor_default)(void); cfp_array3d (*ctor)(size_t nx, size_t ny, size_t nz, double rate, const double* p, size_t cache_size); cfp_array3d (*ctor_copy)(const cfp_array3d src); cfp_array3d (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array3f.h b/include/zfp/internal/cfp/array3f.h index 43fbe7229..e0f3aba5a 100644 --- a/include/zfp/internal/cfp/array3f.h +++ b/include/zfp/internal/cfp/array3f.h @@ -98,7 +98,7 @@ typedef struct { } cfp_header3f_api; typedef struct { - cfp_array3f (*ctor_default)(); + cfp_array3f (*ctor_default)(void); cfp_array3f (*ctor)(size_t nx, size_t ny, size_t nz, double rate, const float* p, size_t cache_size); cfp_array3f (*ctor_copy)(const cfp_array3f src); cfp_array3f (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array4d.h b/include/zfp/internal/cfp/array4d.h index 22e6a88fd..44d1ecf08 100644 --- a/include/zfp/internal/cfp/array4d.h +++ b/include/zfp/internal/cfp/array4d.h @@ -99,7 +99,7 @@ typedef struct { } cfp_header4d_api; typedef struct { - cfp_array4d (*ctor_default)(); + cfp_array4d (*ctor_default)(void); cfp_array4d (*ctor)(size_t nx, size_t ny, size_t nz, size_t nw, double rate, const double* p, size_t cache_size); cfp_array4d (*ctor_copy)(const cfp_array4d src); cfp_array4d (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/include/zfp/internal/cfp/array4f.h b/include/zfp/internal/cfp/array4f.h index b5e076748..b336dffe1 100644 --- a/include/zfp/internal/cfp/array4f.h +++ b/include/zfp/internal/cfp/array4f.h @@ -99,7 +99,7 @@ typedef struct { } cfp_header4f_api; typedef struct { - cfp_array4f (*ctor_default)(); + cfp_array4f (*ctor_default)(void); cfp_array4f (*ctor)(size_t nx, size_t ny, size_t nz, size_t nw, double rate, const float* p, size_t cache_size); cfp_array4f (*ctor_copy)(const cfp_array4f src); cfp_array4f (*ctor_header)(const cfp_header h, const void* buffer, size_t buffer_size_bytes); diff --git a/src/zfp.c b/src/zfp.c index a498a985f..6192bd614 100644 --- a/src/zfp.c +++ b/src/zfp.c @@ -105,7 +105,7 @@ zfp_type_size(zfp_type type) /* public functions: fields ------------------------------------------------ */ zfp_field* -zfp_field_alloc() +zfp_field_alloc(void) { zfp_field* field = (zfp_field*)malloc(sizeof(zfp_field)); if (field) { @@ -465,7 +465,7 @@ zfp_field_set_metadata(zfp_field* field, uint64 meta) /* public functions: compression mode and parameter settings --------------- */ zfp_config -zfp_config_none() +zfp_config_none(void) { zfp_config config; config.mode = zfp_mode_null; @@ -507,7 +507,7 @@ zfp_config_accuracy( } zfp_config -zfp_config_reversible() +zfp_config_reversible(void) { zfp_config config; config.mode = zfp_mode_reversible; diff --git a/utils/zfp.c b/utils/zfp.c index 3520f7437..1984532f5 100644 --- a/utils/zfp.c +++ b/utils/zfp.c @@ -80,7 +80,7 @@ print_error(const void* fin, const void* fout, zfp_type type, size_t n) } static void -usage() +usage(void) { fprintf(stderr, "%s\n", zfp_version_string); fprintf(stderr, "Usage: zfp \n");