Eliminate -Wunknown-pragmas and -Wsign-compare warnings on GCC
This commit is contained in:
parent
707b81b626
commit
71dc3269cd
@ -519,7 +519,7 @@ static char *text_file_preview(const char *fname) {
|
||||
int len = fread(text, 1, 4010, in);
|
||||
fclose(in);
|
||||
text[len] = 0;
|
||||
if (strlen(text) < len) text[0] = 0; // presence of null byte in file --> not text
|
||||
if ((int)strlen(text) < len) text[0] = 0; // presence of null byte in file --> not text
|
||||
char *p = text;
|
||||
int count = 0;
|
||||
const char *end = text + strlen(text);
|
||||
|
@ -1268,8 +1268,10 @@ static long getIncrData(uchar* &data, const XSelectionEvent& selevent, long lowe
|
||||
Note: '#pragma GCC diagnostic push' needs at least GCC 4.6.
|
||||
*/
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5))
|
||||
#pragma GCC diagnostic push
|
||||
@ -1284,7 +1286,9 @@ static KeySym fl_KeycodeToKeysym(Display *d, KeyCode k, unsigned i) {
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#if USE_XRANDR
|
||||
static void react_to_screen_reconfiguration() {
|
||||
|
Loading…
Reference in New Issue
Block a user