kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=70ee606634b26a3b16085058db24ffeb61f312c4
commit 70ee606634b26a3b16085058db24ffeb61f312c4 Author: Kim Woelders <k...@woelders.dk> Date: Sun Feb 12 08:11:34 2017 +0100 Warning fixes for gcc 7. --- epp/cpplib.c | 3 +++ src/borders.c | 4 ++-- src/config.c | 3 ++- src/events.c | 5 +++-- src/x.c | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/epp/cpplib.c b/epp/cpplib.c index cb9e094..f96d468 100644 --- a/epp/cpplib.c +++ b/epp/cpplib.c @@ -3142,6 +3142,7 @@ get_directive_token(cpp_reader * pfile) if (!CPP_IS_MACRO_BUFFER(CPP_BUFFER(pfile))) return token; /* ... else fall though ... */ + /* FALLTHROUGH */ case CPP_HSPACE: case CPP_COMMENT: CPP_SET_WRITTEN(pfile, old_written); @@ -4289,6 +4290,7 @@ skip_if_group(cpp_reader * pfile, int any) validate_else(pfile, kt->type == T_ELSE ? "#else" : "#endif"); + /* FALLTHROUGH */ case T_ELIF: if (pfile->if_stack == CPP_BUFFER(pfile)->if_stack) { @@ -6658,6 +6660,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) opts->out_fname = ""; break; } /* else fall through into error */ + /* FALLTHROUGH */ default: return i; } diff --git a/src/borders.c b/src/borders.c index 2f50d16..4ddc76b 100644 --- a/src/borders.c +++ b/src/borders.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2015 Kim Woelders + * Copyright (C) 2004-2017 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -86,7 +86,7 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force) const char *txt; int flags; - if (ewb->win == NoXID) + if (!ewb->win) return; #if 0 /* Debug */ diff --git a/src/config.c b/src/config.c index 87a3a20..5c43052 100644 --- a/src/config.c +++ b/src/config.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2014 Kim Woelders + * Copyright (C) 2004-2017 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -137,6 +137,7 @@ GetLine(char *s, int size, FILE * f) case '\t': if (so == s) /* Skip leading whitespace */ break; + /* FALLTHROUGH */ case_char: /* Normal character */ default: *so++ = ch; diff --git a/src/events.c b/src/events.c index 9650a1e..c343e61 100644 --- a/src/events.c +++ b/src/events.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2015 Kim Woelders + * Copyright (C) 2004-2017 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -47,14 +47,15 @@ #endif #if USE_XPRESENT #include <X11/extensions/Xpresent.h> +#define USE_GENERIC 1 #endif #if USE_GLX #include <GL/glx.h> #endif #if USE_XI2 #include <X11/extensions/XInput2.h> +#define USE_GENERIC 1 #endif -#define USE_GENERIC defined(USE_XI2) || defined(USE_XPRESENT) #include "E.h" #include "aclass.h" diff --git a/src/x.c b/src/x.c index b13e98c..949cfdb 100644 --- a/src/x.c +++ b/src/x.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2015 Kim Woelders + * Copyright (C) 2004-2017 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -579,7 +579,7 @@ EDestroyWindow(Win win) #if DEBUG_XWIN Eprintf("%s: %p %#x\n", __func__, win, win->xwin); #endif - if (win->parent != NoXID) + if (win->parent) { EFreeWindowBackgroundPixmap(win); XDestroyWindow(disp, win->xwin); --