mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
Dead macro cleanup
Enable -Wunused-macros, and remove said unused macros
This commit is contained in:
parent
3a2ba60b70
commit
b9b6b6108e
6 changed files with 18 additions and 64 deletions
|
@ -1294,11 +1294,16 @@
|
||||||
);
|
);
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_LABEL = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
||||||
WARNING_CFLAGS = "-Wall";
|
WARNING_CFLAGS = (
|
||||||
|
"-Wall",
|
||||||
|
"-Wunused-macros",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = "Release_C++11";
|
name = "Release_C++11";
|
||||||
};
|
};
|
||||||
|
@ -1423,12 +1428,17 @@
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_LABEL = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
||||||
WARNING_CFLAGS = "-Wall";
|
WARNING_CFLAGS = (
|
||||||
|
"-Wall",
|
||||||
|
"-Wunused-macros",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
|
@ -1450,11 +1460,16 @@
|
||||||
);
|
);
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_LABEL = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
||||||
WARNING_CFLAGS = "-Wall";
|
WARNING_CFLAGS = (
|
||||||
|
"-Wall",
|
||||||
|
"-Wunused-macros",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,35 +57,6 @@
|
||||||
*/
|
*/
|
||||||
#define COMPLETE_VAR_DESC_VAL _( L"Variable: %ls" )
|
#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
|
The special cased translation macro for completions. The empty
|
||||||
string needs to be special cased, since it can occur, and should
|
string needs to be special cased, since it can occur, and should
|
||||||
|
|
11
src/kill.cpp
11
src/kill.cpp
|
@ -20,17 +20,6 @@
|
||||||
#include "exec.h"
|
#include "exec.h"
|
||||||
#include "path.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 */
|
/** Kill ring */
|
||||||
typedef std::list<wcstring> kill_list_t;
|
typedef std::list<wcstring> kill_list_t;
|
||||||
static kill_list_t kill_list;
|
static kill_list_t kill_list;
|
||||||
|
|
|
@ -31,11 +31,6 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "output.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);
|
static int writeb_internal(char c);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,22 +29,11 @@ The fish parser. Contains functions for parsing and evaluating code.
|
||||||
#include "parse_tree.h"
|
#include "parse_tree.h"
|
||||||
#include "parse_execution.h"
|
#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
|
Error for evaluating in illegal scope
|
||||||
*/
|
*/
|
||||||
#define INVALID_SCOPE_ERR_MSG _( L"Tried to evaluate commands using invalid block type '%ls'" )
|
#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
|
While block description
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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};
|
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
|
#ifndef PATH_MAX
|
||||||
#ifdef MAXPATHLEN
|
#ifdef MAXPATHLEN
|
||||||
#define PATH_MAX MAXPATHLEN
|
#define PATH_MAX MAXPATHLEN
|
||||||
|
|
Loading…
Reference in a new issue