Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidgraham committed Jul 4, 2014
1 parent d4656ad commit 1d979dd
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
23 changes: 22 additions & 1 deletion src/out-certs.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
static void
cert_out_open(struct Output *out, FILE *fp)
{
UNUSEDPARM(out);
UNUSEDPARM(fp);
}


Expand All @@ -18,6 +20,7 @@ cert_out_open(struct Output *out, FILE *fp)
static void
cert_out_close(struct Output *out, FILE *fp)
{
UNUSEDPARM(out);
fprintf(fp, "{finished: 1}\n");
}

Expand All @@ -27,7 +30,17 @@ static void
cert_out_status(struct Output *out, FILE *fp, time_t timestamp, int status,
unsigned ip, unsigned ip_proto, unsigned port, unsigned reason, unsigned ttl)
{

/* certificates only come with banner info, so there is no port info
* to report */
UNUSEDPARM(out);
UNUSEDPARM(fp);
UNUSEDPARM(timestamp);
UNUSEDPARM(status);
UNUSEDPARM(ip);
UNUSEDPARM(ip_proto);
UNUSEDPARM(port);
UNUSEDPARM(reason);
UNUSEDPARM(ttl);
}


Expand All @@ -41,6 +54,14 @@ cert_out_banner(struct Output *out, FILE *fp, time_t timestamp,
const unsigned char *px, unsigned length)
{
unsigned i;

UNUSEDPARM(ip_proto);
UNUSEDPARM(ip);
UNUSEDPARM(timestamp);
UNUSEDPARM(fp);
UNUSEDPARM(out);
UNUSEDPARM(ttl);

if (length > 5 && memcmp(px, "cert:", 5) == 0) {
px += 5;
length -= 5;
Expand Down
6 changes: 6 additions & 0 deletions src/out-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
static void
json_out_open(struct Output *out, FILE *fp)
{
UNUSEDPARM(out);
UNUSEDPARM(fp);
}


Expand All @@ -18,6 +20,7 @@ json_out_open(struct Output *out, FILE *fp)
static void
json_out_close(struct Output *out, FILE *fp)
{
UNUSEDPARM(out);
fprintf(fp, "{finished: 1}\n");
}

Expand All @@ -30,6 +33,7 @@ json_out_status(struct Output *out, FILE *fp, time_t timestamp, int status,
{
char reason_buffer[128];
UNUSEDPARM(out);
UNUSEDPARM(timestamp);

fprintf(fp, "{ ");
fprintf(fp, " ip: \"%u.%u.%u.%u\", ",
Expand Down Expand Up @@ -93,6 +97,8 @@ json_out_banner(struct Output *out, FILE *fp, time_t timestamp,
{
char banner_buffer[65536];

UNUSEDPARM(ttl);
UNUSEDPARM(timestamp);

fprintf(fp, "{ ");
fprintf(fp, " ip: \"%u.%u.%u.%u\", ",
Expand Down
4 changes: 2 additions & 2 deletions src/proto-ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ ssl_selftest(void)
&more
);
}
if (0) {
/*if (0) {
const char *foo = (char*)banout_string(banout1, PROTO_X509_CERT);
printf("-----BEGIN CERTIFICATE-----\n");
for (;;) {
Expand All @@ -1096,7 +1096,7 @@ ssl_selftest(void)
}
printf("-----END CERTIFICATE-----\n");
}
}*/
banner1_destroy(banner1);
banout_release(banout1);

Expand Down
2 changes: 2 additions & 0 deletions src/proto-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ tcpcon_destroy_tcb(
struct TCP_Control_Block **r_entry;
struct BannerOutput *banout;

UNUSEDPARM(reason);

//printf("." "tcb age = %u-sec, reason=%u \n", time(0) - tcb->when_created, reason);

/*
Expand Down
2 changes: 2 additions & 0 deletions vs10/masscan.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
<ClCompile Include="..\src\in-binary.c" />
<ClCompile Include="..\src\masscan-app.c" />
<ClCompile Include="..\src\out-binary.c" />
<ClCompile Include="..\src\out-certs.c" />
<ClCompile Include="..\src\out-grepable.c" />
<ClCompile Include="..\src\out-json.c" />
<ClCompile Include="..\src\out-null.c" />
<ClCompile Include="..\src\out-redis.c" />
<ClCompile Include="..\src\out-text.c" />
Expand Down
6 changes: 6 additions & 0 deletions vs10/masscan.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@
<ClCompile Include="..\src\crypto-blackrock2.c">
<Filter>Source Files\crypto</Filter>
</ClCompile>
<ClCompile Include="..\src\out-json.c">
<Filter>Source Files\output</Filter>
</ClCompile>
<ClCompile Include="..\src\out-certs.c">
<Filter>Source Files\output</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\proto-arp.h">
Expand Down

0 comments on commit 1d979dd

Please sign in to comment.