diff --git a/lib/aligned_malloc.h b/lib/aligned_malloc.h index ee6e7b8..f301a0e 100644 --- a/lib/aligned_malloc.h +++ b/lib/aligned_malloc.h @@ -7,7 +7,7 @@ #include "lib_common.h" -extern void *aligned_malloc(size_t alignment, size_t size); -extern void aligned_free(void *ptr); +void *aligned_malloc(size_t alignment, size_t size); +void aligned_free(void *ptr); #endif /* LIB_ALIGNED_MALLOC_H */ diff --git a/lib/arm/cpu_features.h b/lib/arm/cpu_features.h index 390d96c..dae3b89 100644 --- a/lib/arm/cpu_features.h +++ b/lib/arm/cpu_features.h @@ -23,7 +23,7 @@ extern volatile u32 _cpu_features; -extern void setup_cpu_features(void); +void setup_cpu_features(void); static inline u32 get_cpu_features(void) { diff --git a/lib/deflate_compress.h b/lib/deflate_compress.h index f4bb23b..d97d019 100644 --- a/lib/deflate_compress.h +++ b/lib/deflate_compress.h @@ -8,7 +8,6 @@ struct libdeflate_compressor; -extern unsigned int -deflate_get_compression_level(struct libdeflate_compressor *c); +unsigned int deflate_get_compression_level(struct libdeflate_compressor *c); #endif /* LIB_DEFLATE_COMPRESS_H */ diff --git a/lib/x86/cpu_features.h b/lib/x86/cpu_features.h index b224181..a2ad544 100644 --- a/lib/x86/cpu_features.h +++ b/lib/x86/cpu_features.h @@ -27,7 +27,7 @@ extern volatile u32 _cpu_features; -extern void setup_cpu_features(void); +void setup_cpu_features(void); static inline u32 get_cpu_features(void) { diff --git a/programs/prog_util.h b/programs/prog_util.h index 0265dd0..66d8cf1 100644 --- a/programs/prog_util.h +++ b/programs/prog_util.h @@ -57,7 +57,7 @@ */ #include -extern int wmain(int argc, wchar_t **argv); +int wmain(int argc, wchar_t **argv); # define tmain wmain # define tchar wchar_t # define _T(text) L##text @@ -116,12 +116,12 @@ extern int wmain(int argc, wchar_t **argv); extern const tchar *program_invocation_name; -extern void _printf(1, 2) msg(const char *fmt, ...); -extern void _printf(1, 2) msg_errno(const char *fmt, ...); +void _printf(1, 2) msg(const char *fmt, ...); +void _printf(1, 2) msg_errno(const char *fmt, ...); -extern void *xmalloc(size_t size); +void *xmalloc(size_t size); -extern const tchar *get_filename(const tchar *path); +const tchar *get_filename(const tchar *path); struct file_stream { int fd; @@ -132,27 +132,26 @@ struct file_stream { size_t mmap_size; }; -extern int xopen_for_read(const tchar *path, bool symlink_ok, - struct file_stream *strm); -extern int xopen_for_write(const tchar *path, bool force, - struct file_stream *strm); -extern int map_file_contents(struct file_stream *strm, u64 size); +int xopen_for_read(const tchar *path, bool symlink_ok, + struct file_stream *strm); +int xopen_for_write(const tchar *path, bool force, struct file_stream *strm); +int map_file_contents(struct file_stream *strm, u64 size); -extern ssize_t xread(struct file_stream *strm, void *buf, size_t count); -extern int full_write(struct file_stream *strm, const void *buf, size_t count); +ssize_t xread(struct file_stream *strm, void *buf, size_t count); +int full_write(struct file_stream *strm, const void *buf, size_t count); -extern int xclose(struct file_stream *strm); +int xclose(struct file_stream *strm); -extern int parse_compression_level(tchar opt_char, const tchar *arg); +int parse_compression_level(tchar opt_char, const tchar *arg); -extern struct libdeflate_compressor *alloc_compressor(int level); -extern struct libdeflate_decompressor *alloc_decompressor(void); +struct libdeflate_compressor *alloc_compressor(int level); +struct libdeflate_decompressor *alloc_decompressor(void); /* tgetopt.c */ extern tchar *toptarg; extern int toptind, topterr, toptopt; -extern int tgetopt(int argc, tchar *argv[], const tchar *optstring); +int tgetopt(int argc, tchar *argv[], const tchar *optstring); #endif /* PROGRAMS_PROG_UTIL_H */ diff --git a/programs/test_util.h b/programs/test_util.h index 10f025a..e10c154 100644 --- a/programs/test_util.h +++ b/programs/test_util.h @@ -38,21 +38,21 @@ # define _noreturn #endif -extern void _noreturn +void _noreturn assertion_failed(const char *expr, const char *file, int line); #define ASSERT(expr) { if (unlikely(!(expr))) \ assertion_failed(#expr, __FILE__, __LINE__); } -extern void begin_performance_test(void); +void begin_performance_test(void); -extern void alloc_guarded_buffer(size_t size, u8 **start_ret, u8 **end_ret); -extern void free_guarded_buffer(u8 *start, u8 *end); +void alloc_guarded_buffer(size_t size, u8 **start_ret, u8 **end_ret); +void free_guarded_buffer(u8 *start, u8 *end); -extern u64 timer_ticks(void); -extern u64 timer_ticks_to_ms(u64 ticks); -extern u64 timer_MB_per_s(u64 bytes, u64 ticks); -extern u64 timer_KB_per_s(u64 bytes, u64 ticks); +u64 timer_ticks(void); +u64 timer_ticks_to_ms(u64 ticks); +u64 timer_MB_per_s(u64 bytes, u64 ticks); +u64 timer_KB_per_s(u64 bytes, u64 ticks); struct output_bitstream { machine_word_t bitbuf; @@ -61,8 +61,7 @@ struct output_bitstream { u8 *end; }; -extern bool put_bits(struct output_bitstream *os, machine_word_t bits, - int num_bits); -extern bool flush_bits(struct output_bitstream *os); +bool put_bits(struct output_bitstream *os, machine_word_t bits, int num_bits); +bool flush_bits(struct output_bitstream *os); #endif /* PROGRAMS_TEST_UTIL_H */