[fastmanifest] enforce strict prototypes

Summary: Newer versions of gcc (5.x) turn on `-Wstrict-prototype` by default.  Turn this on in our setup.py file for older compilers, and fix the errors that crop up from this.

Test Plan: make local

Reviewers: tnardone, wez, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3414620

Signature: t1:3414620:1465514102:d91026062582e2a3ab3fc773bbf17686fa38609f
This commit is contained in:
Tony Tung 2016-06-09 22:45:05 -07:00
parent 60873bc788
commit 3cb14683b0
3 changed files with 7 additions and 4 deletions

View File

@ -59,7 +59,7 @@ typedef struct _iterator_t iterator_t;
*/
extern bool valid_path(const char *path, const size_t path_sz);
extern tree_t *alloc_tree();
extern tree_t *alloc_tree(void);
extern void destroy_tree(tree_t *tree);

View File

@ -62,7 +62,7 @@ typedef struct _v0_header_t {
/**
* Returns true iff the host is little endian.
*/
static inline bool little_endian() {
static inline bool little_endian(void) {
int foo = LITTLE_ENDIAN_TEST_VALUE;
if (ntohl(foo) == LITTLE_ENDIAN_TEST_VALUE) {
return false;
@ -74,7 +74,7 @@ static inline bool little_endian() {
/**
* Returns the size, in bytes, of the host pointer.
*/
static inline uint8_t host_pointer_size() {
static inline uint8_t host_pointer_size(void) {
return sizeof(void*);
}

View File

@ -85,7 +85,10 @@ setup(
],
libraries=['crypto',
],
extra_compile_args=["-std=c99", "-Wall", "-Werror"],
extra_compile_args=[
"-std=c99",
"-Wall",
"-Werror", "-Werror=strict-prototypes"],
)
],
)