aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/sort
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2012-06-08 19:21:49 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2012-06-08 19:21:49 +0000
commit89b7a5879e6e19ff52e9e1c7940072de7174ccfd (patch)
tree93c3c662ca22cf76bb0680c32328f9f43bab464e /usr.bin/sort
parent7ac1b61aacd5dbad29daa1be36a02c4340d7fb31 (diff)
downloadsrc-89b7a5879e6e19ff52e9e1c7940072de7174ccfd.tar.gz
src-89b7a5879e6e19ff52e9e1c7940072de7174ccfd.zip
Notes
Diffstat (limited to 'usr.bin/sort')
-rw-r--r--usr.bin/sort/coll.c24
-rw-r--r--usr.bin/sort/sort.h2
2 files changed, 9 insertions, 17 deletions
diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c
index 6d2d293ee8e5..b7e1cf2ecd6a 100644
--- a/usr.bin/sort/coll.c
+++ b/usr.bin/sort/coll.c
@@ -792,7 +792,8 @@ cmpsuffix(unsigned char si1, unsigned char si2)
* Implements numeric sort for -n and -h.
*/
static int
-numcoll_impl(struct key_value *kv1, struct key_value *kv2, size_t offset, bool use_suffix)
+numcoll_impl(struct key_value *kv1, struct key_value *kv2,
+ size_t offset __unused, bool use_suffix)
{
struct bwstring *s1, *s2;
wchar_t sfrac1[MAX_NUM_SIZE + 1], sfrac2[MAX_NUM_SIZE + 1];
@@ -810,8 +811,6 @@ numcoll_impl(struct key_value *kv1, struct key_value *kv2, size_t offset, bool u
cmp_res = 0;
key1_read = key2_read = false;
- UNUSED_ARG(offset);
-
if (debug_sort) {
bwsprintf(stdout, s1, "; k1=<", ">");
bwsprintf(stdout, s2, ", k2=<", ">");
@@ -968,14 +967,13 @@ hnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
* Implements random sort (-R).
*/
static int
-randomcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
+randomcoll(struct key_value *kv1, struct key_value *kv2,
+ size_t offset __unused)
{
struct bwstring *s1, *s2;
MD5_CTX ctx1, ctx2;
char *b1, *b2;
- UNUSED_ARG(offset);
-
s1 = kv1->k;
s2 = kv2->k;
@@ -1022,12 +1020,11 @@ randomcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
* Implements version sort (-V).
*/
static int
-versioncoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
+versioncoll(struct key_value *kv1, struct key_value *kv2,
+ size_t offset __unused)
{
struct bwstring *s1, *s2;
- UNUSED_ARG(offset);
-
s1 = kv1->k;
s2 = kv2->k;
@@ -1098,7 +1095,8 @@ cmp_nans(double d1, double d2)
* Implements general numeric sort (-g).
*/
static int
-gnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
+gnumcoll(struct key_value *kv1, struct key_value *kv2,
+ size_t offset __unused)
{
double d1, d2;
int err1, err2;
@@ -1108,8 +1106,6 @@ gnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
err1 = err2 = 0;
key1_read = key2_read = false;
- UNUSED_ARG(offset);
-
if (debug_sort) {
bwsprintf(stdout, kv1->k, "; k1=<", ">");
bwsprintf(stdout, kv2->k, "; k2=<", ">");
@@ -1256,7 +1252,7 @@ gnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
* Implements month sort (-M).
*/
static int
-monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
+monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __unused)
{
int val1, val2;
bool key1_read, key2_read;
@@ -1264,8 +1260,6 @@ monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset)
val1 = val2 = 0;
key1_read = key2_read = false;
- UNUSED_ARG(offset);
-
if (debug_sort) {
bwsprintf(stdout, kv1->k, "; k1=<", ">");
bwsprintf(stdout, kv2->k, "; k2=<", ">");
diff --git a/usr.bin/sort/sort.h b/usr.bin/sort/sort.h
index 0a90637bd4f7..525b62513e54 100644
--- a/usr.bin/sort/sort.h
+++ b/usr.bin/sort/sort.h
@@ -41,8 +41,6 @@
#define VERSION "2.3-FreeBSD"
-#define UNUSED_ARG(A) do { (void)(A); } while(0)
-
#ifdef WITHOUT_NLS
#define getstr(n) nlsstr[n]
#else