Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
fix empty parameter list => void argument
Browse files Browse the repository at this point in the history
  • Loading branch information
François (fser) authored and Francois Serman committed Jul 28, 2017
1 parent d8a8c22 commit 9d4824b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/geoiplookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef unsigned int uint32_t;

void geoiplookup(GeoIP * gi, char *hostname, int i);

void usage()
void usage(void)
{
fprintf(
stderr,
Expand Down
2 changes: 1 addition & 1 deletion apps/geoiplookup6.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "GeoIP_internal.h"
void geoiplookup(GeoIP * gi, char *hostname, int i);

void usage()
void usage(void)
{
fprintf(
stderr,
Expand Down
2 changes: 1 addition & 1 deletion libGeoIP/GeoIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ char *_GeoIP_full_path_to(const char *file_name)

char ** GeoIPDBFileName = NULL;

void _GeoIP_setup_dbfilename()
void _GeoIP_setup_dbfilename(void)
{
if (NULL == GeoIPDBFileName) {
GeoIPDBFileName = malloc(sizeof(char *) * NUM_DB_TYPES);
Expand Down
2 changes: 1 addition & 1 deletion libGeoIP/GeoIP_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GEOIP_API unsigned long _GeoIP_lookupaddress(const char *host);
GEOIP_API geoipv6_t _GeoIP_lookupaddress_v6(const char *host);
GEOIP_API int __GEOIP_V6_IS_NULL(geoipv6_t v6);

GEOIP_API void _GeoIP_setup_dbfilename();
GEOIP_API void _GeoIP_setup_dbfilename(void);
GEOIP_API char *_GeoIP_full_path_to(const char *file_name);

/* deprecated */
Expand Down
10 changes: 5 additions & 5 deletions test/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ FILETIME timer_t2;
#endif /* !defined(_WIN32) */

#if !defined(_WIN32)
void timerstart()
void timerstart(void)
{
gettimeofday(&timer_t1, NULL);
}

double timerstop()
double timerstop(void)
{
int a1 = 0;
int a2 = 0;
Expand All @@ -58,12 +58,12 @@ double timerstop()
return r;
}
#else /* !defined(_WIN32) */
void timerstart()
void timerstart(void)
{
GetSystemTimeAsFileTime(&timer_t1);
}

double timerstop()
double timerstop(void)
{
__int64 delta; /* VC6 can't convert an unsigned int64 to to double */
GetSystemTimeAsFileTime(&timer_t2);
Expand Down Expand Up @@ -152,7 +152,7 @@ void testgeoipcity(int flags, const char *msg, int numlookups)
GeoIP_delete(i);
}

int main()
int main(void)
{
int time = 300 * numipstrings;
testgeoipcountry(0, "GeoIP Country", 100 * time);
Expand Down
2 changes: 1 addition & 1 deletion test/test-geoip-invalid-file.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "GeoIP.h"

int main()
int main(void)
{
GeoIP *gi = GeoIP_open(SRCDIR "/README.md", GEOIP_MEMORY_CACHE);

Expand Down
2 changes: 1 addition & 1 deletion test/test-geoip-region.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static const char *_mk_NA(const char *p)
return p ? p : "N/A";
}

int main()
int main(void)
{
GeoIP *gi;
GeoIPRegion *gir, giRegion;
Expand Down
2 changes: 1 addition & 1 deletion test/test-geoip.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "GeoIP.h"

int main()
int main(void)
{
FILE *f;
char *db_info;
Expand Down

2 comments on commit 9d4824b

@gvanem
Copy link

@gvanem gvanem commented on 9d4824b Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have WSAStartup() added in test-geoip-region.c to actually enable tests for Windows.

@oschwald
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gvanem, a PR would be welcomed! 🙂

Please sign in to comment.