Skip to content

Commit

Permalink
Use (void) x instead of x = x to mark unused variables.
Browse files Browse the repository at this point in the history
x = x makes clang whine about assigning a variable to itself.
  • Loading branch information
jedisct1 committed Sep 15, 2013
1 parent c0ac27f commit 884cb50
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void output_report_banner(
#if defined(_MSC_VER)
#define UNUSEDPARM(x) x
#else
#define UNUSEDPARM(x) (x)=(x)
#define UNUSEDPARM(x) (void) x
#endif
#endif

Expand Down
3 changes: 2 additions & 1 deletion src/proto-ssh.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "proto-ssh.h"
#include "proto-banner1.h"
#include "unusedparm.h"
#include <ctype.h>


Expand All @@ -13,7 +14,7 @@ banner_ssh( struct Banner1 *banner1,
{
unsigned i;

banner1=banner1;
UNUSEDPARM(banner1);

for (i=0; i<length; i++)
switch (state) {
Expand Down
2 changes: 1 addition & 1 deletion src/unusedparm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#if defined(_MSC_VER)
#define UNUSEDPARM(x) x
#elif defined(__GNUC__)
#define UNUSEDPARM(x)
#define UNUSEDPARM(x) (void) x
#endif
#endif

0 comments on commit 884cb50

Please sign in to comment.