aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-10 22:01:50 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-10 22:01:50 -0700
commitb9b6b6108e53e3b5ea09b78c334b16fa0e4ac8a9 (patch)
treeadf9a665463ba016fa945876b7a009aa197051e0
parent3a2ba60b707edb0748e571ef067fd2b41ca14a13 (diff)
Dead macro cleanup
Enable -Wunused-macros, and remove said unused macros
-rw-r--r--fish.xcodeproj/project.pbxproj21
-rw-r--r--src/complete.cpp29
-rw-r--r--src/kill.cpp11
-rw-r--r--src/output.cpp5
-rw-r--r--src/parser.cpp11
-rw-r--r--src/wutil.cpp5
6 files changed, 18 insertions, 64 deletions
diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj
index be2b8390..5c6b07e3 100644
--- a/fish.xcodeproj/project.pbxproj
+++ b/fish.xcodeproj/project.pbxproj
@@ -1294,11 +1294,16 @@
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
- WARNING_CFLAGS = "-Wall";
+ WARNING_CFLAGS = (
+ "-Wall",
+ "-Wunused-macros",
+ );
};
name = "Release_C++11";
};
@@ -1423,12 +1428,17 @@
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
- WARNING_CFLAGS = "-Wall";
+ WARNING_CFLAGS = (
+ "-Wall",
+ "-Wunused-macros",
+ );
};
name = Debug;
};
@@ -1450,11 +1460,16 @@
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
- WARNING_CFLAGS = "-Wall";
+ WARNING_CFLAGS = (
+ "-Wall",
+ "-Wunused-macros",
+ );
};
name = Release;
};
diff --git a/src/complete.cpp b/src/complete.cpp
index ed30776d..25e81c67 100644
--- a/src/complete.cpp
+++ b/src/complete.cpp
@@ -58,35 +58,6 @@
#define COMPLETE_VAR_DESC_VAL _( L"Variable: %ls" )
/**
- The maximum number of commands on which to perform description
- lookup. The lookup process is quite time consuming, so this should
- be set to a pretty low number.
-*/
-#define MAX_CMD_DESC_LOOKUP 10
-
-/**
- Condition cache value returned from hashtable when this condition
- has not yet been tested. This value is NULL, so that when the hash
- table returns NULL, this wil be seen as an untested condition.
-*/
-#define CC_NOT_TESTED 0
-
-/**
- Condition cache value returned from hashtable when the condition is
- met. This can be any value, that is a valid pointer, and that is
- different from CC_NOT_TESTED and CC_FALSE.
-*/
-#define CC_TRUE L"true"
-
-/**
- Condition cache value returned from hashtable when the condition is
- not met. This can be any value, that is a valid pointer, and that
- is different from CC_NOT_TESTED and CC_TRUE.
-
-*/
-#define CC_FALSE L"false"
-
-/**
The special cased translation macro for completions. The empty
string needs to be special cased, since it can occur, and should
not be translated. (Gettext returns the version information as the
diff --git a/src/kill.cpp b/src/kill.cpp
index 22f21475..7b68b16c 100644
--- a/src/kill.cpp
+++ b/src/kill.cpp
@@ -20,17 +20,6 @@
#include "exec.h"
#include "path.h"
-/**
- Maximum entries in killring
-*/
-#define KILL_MAX 8192
-
-/** Last kill string */
-//static ll_node_t *kill_last=0;
-
-/** Current kill string */
-//static ll_node_t *kill_current=0;
-
/** Kill ring */
typedef std::list<wcstring> kill_list_t;
static kill_list_t kill_list;
diff --git a/src/output.cpp b/src/output.cpp
index 8f97ce61..1707f4fb 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -31,11 +31,6 @@
#include "common.h"
#include "output.h"
-/**
- Number of color names in the col array
- */
-#define FISH_COLORS (sizeof(col)/sizeof(wchar_t *))
-
static int writeb_internal(char c);
diff --git a/src/parser.cpp b/src/parser.cpp
index 95880922..4b2bff93 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -30,22 +30,11 @@ The fish parser. Contains functions for parsing and evaluating code.
#include "parse_execution.h"
/**
- Error message for tokenizer error. The tokenizer message is
- appended to this message.
-*/
-#define TOK_ERR_MSG _( L"Tokenizer error: '%ls'")
-
-/**
Error for evaluating in illegal scope
*/
#define INVALID_SCOPE_ERR_MSG _( L"Tried to evaluate commands using invalid block type '%ls'" )
/**
- Error for wrong token type
-*/
-#define UNEXPECTED_TOKEN_ERR_MSG _( L"Unexpected token of type '%ls'")
-
-/**
While block description
*/
#define WHILE_BLOCK N_( L"'while' block" )
diff --git a/src/wutil.cpp b/src/wutil.cpp
index 19645042..0e233ac7 100644
--- a/src/wutil.cpp
+++ b/src/wutil.cpp
@@ -30,11 +30,6 @@ typedef std::string cstring;
const file_id_t kInvalidFileID = {(dev_t)-1LL, (ino_t)-1LL, (uint64_t)-1LL, -1, -1, (uint32_t)-1};
-/**
- Minimum length of the internal covnersion buffers
-*/
-#define TMP_LEN_MIN 256
-
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN