This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via 46802efc5a8396cd08c0eb6ce046c8fec28a441f (commit)
via bff550fb2a493973506856d6bc1f00e90a39b602 (commit)
via bc887808cf563b2ca1d9394ae88100e60fcce3a6 (commit)
via a3264184bd5f93cb2655db2f11375a9a1ed11936 (commit)
via 821bacb5f45223e59ae92a2cf36632bdec592aa2 (commit)
via 3cf4ba91aa87ee6b99169d84f294b8c5ad4bd677 (commit)
via 0717a0f07e5fb1163fc3888f5c9d8a55a4898f9e (commit)
via c42d6822de0a98fb42615460407f6639fcf243c3 (commit)
from 4dadc83a4c3adbf0d94f98133a10e5232f7c3873 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/46802efc5a8396cd08c0eb6ce046c8fec28a441f
commit 46802efc5a8396cd08c0eb6ce046c8fec28a441f
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:59 2013 +0200
wmaker: Marked arg as unused for compiler in callback code
As a callback function has a fixed prototype, it is not an error to have
some arguments unused, but we need to let the compiler about it to avoid
spurious messages that would hide real cases.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/src/startup.c b/src/startup.c
index 90154d8..ce5a774 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -163,6 +163,8 @@ static RETSIGTYPE handleExitSig(int sig)
/* Dummy signal handler */
static void dummyHandler(int sig)
{
+ /* Parameter is not used, but tell the compiler that it is ok */
+ (void) sig;
}
/*
http://repo.or.cz/w/wmaker-crm.git/commit/bff550fb2a493973506856d6bc1f00e90a39b602
commit bff550fb2a493973506856d6bc1f00e90a39b602
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:58 2013 +0200
wmaker: Removed non necessary macro for buffer size
The C language provides the macro 'sizeof' to handle this kind of
situation, so do not create locally a macro which can become a source
of problems.
Took opportunity to change the size of buffer to follow guidelines
from Inotify's manpage, and to remove the initial value that is useless.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/src/event.c b/src/event.c
index c9ff3df..22349fe 100644
--- a/src/event.c
+++ b/src/event.c
@@ -291,12 +291,11 @@ void DispatchEvent(XEvent * event)
* Calls wDefaultsCheckDomains if config database is updated
*----------------------------------------------------------------------
*/
-/* allow 5 simultaneous events, with path + filenames up to 64 chars */
-#define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
static void handle_inotify_events(void)
{
ssize_t eventQLength, i = 0;
- char buff[BUFF_SIZE] = { 0 };
+ /* Make room for at lease 5 simultaneous events, with path + filenames
*/
+ char buff[ (sizeof(struct inotify_event) + NAME_MAX + 1) * 5 ];
/* Check config only once per read of the event queue */
int oneShotFlag = 0;
@@ -308,7 +307,7 @@ static void handle_inotify_events(void)
* a few entries before a read().
*/
eventQLength = read(w_global.inotify.fd_event_queue,
- buff, BUFF_SIZE);
+ buff, sizeof(buff) );
/* check what events occured */
/* Should really check wd here too, but for now we only have one watch!
*/
http://repo.or.cz/w/wmaker-crm.git/commit/bc887808cf563b2ca1d9394ae88100e60fcce3a6
commit bc887808cf563b2ca1d9394ae88100e60fcce3a6
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:57 2013 +0200
wmaker: Added reset of file handle variable to avoid multiple file close
If the triggering condition occurred, the file handle for Inotify were
closed, but as the variable containing the handle was not updated it
could lead to multiple call to file close, which behaviour may be
problematic.
The file handle was passed as a parameter, which does not allow for a
clean value change, so now we use the variable directly as it is
available in the global namespace.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/src/event.c b/src/event.c
index a9b8162..c9ff3df 100644
--- a/src/event.c
+++ b/src/event.c
@@ -99,7 +99,7 @@ static void handleKeyPress(XEvent *event);
static void handleFocusIn(XEvent *event);
static void handleMotionNotify(XEvent *event);
static void handleVisibilityNotify(XEvent *event);
-static void handle_inotify_events(int fd);
+static void handle_inotify_events(void);
static void wdelete_death_handler(WMagicNumber id);
@@ -293,7 +293,7 @@ void DispatchEvent(XEvent * event)
*/
/* allow 5 simultaneous events, with path + filenames up to 64 chars */
#define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
-static void handle_inotify_events(int fd)
+static void handle_inotify_events(void)
{
ssize_t eventQLength, i = 0;
char buff[BUFF_SIZE] = { 0 };
@@ -307,7 +307,8 @@ static void handle_inotify_events(int fd)
* occur as a result of an Xevent - so the event queue should never
have more than
* a few entries before a read().
*/
- eventQLength = read(fd, buff, BUFF_SIZE);
+ eventQLength = read(w_global.inotify.fd_event_queue,
+ buff, BUFF_SIZE);
/* check what events occured */
/* Should really check wd here too, but for now we only have one watch!
*/
@@ -320,12 +321,17 @@ static void handle_inotify_events(int fd)
if (pevent->mask & IN_DELETE_SELF) {
wwarning(_("the defaults database has been deleted!"
" Restart Window Maker to create the
database" " with the default settings"));
- close(fd);
+
+ close(w_global.inotify.fd_event_queue);
+ w_global.inotify.fd_event_queue = -1;
}
if (pevent->mask & IN_UNMOUNT) {
wwarning(_("the unit containing the defaults database
has"
" been unmounted. Setting --static mode." "
Any changes will not be saved."));
- close(fd);
+
+ if (w_global.inotify.fd_event_queue >= 0)
+ close(w_global.inotify.fd_event_queue);
+
wPreferences.flags.noupdates = 1;
}
if ((pevent->mask & IN_MODIFY) && oneShotFlag == 0) {
@@ -387,7 +393,7 @@ noreturn void EventLoop(void)
continue;
}
if (FD_ISSET(w_global.inotify.fd_event_queue, &rfds))
-
handle_inotify_events(w_global.inotify.fd_event_queue);
+ handle_inotify_events();
}
#endif
}
http://repo.or.cz/w/wmaker-crm.git/commit/a3264184bd5f93cb2655db2f11375a9a1ed11936
commit a3264184bd5f93cb2655db2f11375a9a1ed11936
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:56 2013 +0200
Removed parameters to function 'handle_inotify_events' that were not used
diff --git a/src/event.c b/src/event.c
index 85b25fa..a9b8162 100644
--- a/src/event.c
+++ b/src/event.c
@@ -99,7 +99,7 @@ static void handleKeyPress(XEvent *event);
static void handleFocusIn(XEvent *event);
static void handleMotionNotify(XEvent *event);
static void handleVisibilityNotify(XEvent *event);
-static void handle_inotify_events(int fd, int wd);
+static void handle_inotify_events(int fd);
static void wdelete_death_handler(WMagicNumber id);
@@ -293,7 +293,7 @@ void DispatchEvent(XEvent * event)
*/
/* allow 5 simultaneous events, with path + filenames up to 64 chars */
#define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
-static void handle_inotify_events(int fd, int wd)
+static void handle_inotify_events(int fd)
{
ssize_t eventQLength, i = 0;
char buff[BUFF_SIZE] = { 0 };
@@ -387,7 +387,7 @@ noreturn void EventLoop(void)
continue;
}
if (FD_ISSET(w_global.inotify.fd_event_queue, &rfds))
-
handle_inotify_events(w_global.inotify.fd_event_queue,
w_global.inotify.wd_defaults);
+
handle_inotify_events(w_global.inotify.fd_event_queue);
}
#endif
}
http://repo.or.cz/w/wmaker-crm.git/commit/821bacb5f45223e59ae92a2cf36632bdec592aa2
commit 821bacb5f45223e59ae92a2cf36632bdec592aa2
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:55 2013 +0200
Removed parameter to function 'handleDeadProcess' that was not used
diff --git a/src/event.c b/src/event.c
index 6a34892..85b25fa 100644
--- a/src/event.c
+++ b/src/event.c
@@ -112,7 +112,7 @@ static void handleXkbIndicatorStateNotify(XEvent *event);
#endif
/* real dead process handler */
-static void handleDeadProcess(void *foo);
+static void handleDeadProcess(void);
typedef struct DeadProcesses {
pid_t pid;
@@ -165,7 +165,7 @@ static void wdelete_death_handler(WMagicNumber id)
void DispatchEvent(XEvent * event)
{
if (deathHandlers)
- handleDeadProcess(NULL);
+ handleDeadProcess();
if (WCHECK_STATE(WSTATE_NEED_EXIT)) {
WCHANGE_STATE(WSTATE_EXITING);
@@ -454,7 +454,7 @@ void NotifyDeadProcess(pid_t pid, unsigned char status)
deadProcessPtr++;
}
-static void handleDeadProcess(void *foo)
+static void handleDeadProcess(void)
{
DeathHandler *tmp;
int i;
http://repo.or.cz/w/wmaker-crm.git/commit/3cf4ba91aa87ee6b99169d84f294b8c5ad4bd677
commit 3cf4ba91aa87ee6b99169d84f294b8c5ad4bd677
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:54 2013 +0200
Removed parameter to function 'updateResistance' that was not used
diff --git a/src/moveres.c b/src/moveres.c
index 89fce68..6754be2 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -649,7 +649,7 @@ static int compareWBottom(const void *a, const void *b)
return 0;
}
-static void updateResistance(WWindow * wwin, MoveData * data, int newX, int
newY)
+static void updateResistance(MoveData *data, int newX, int newY)
{
int i;
int newX2 = newX + data->winWidth;
@@ -1177,7 +1177,7 @@ updateWindowPosition(WWindow * wwin, MoveData * data,
Bool doResistance,
/* recalc relative window position */
if (doResistance && (data->realX != newX || data->realY != newY)) {
- updateResistance(wwin, data, newX, newY);
+ updateResistance(data, newX, newY);
}
data->realX = newX;
http://repo.or.cz/w/wmaker-crm.git/commit/0717a0f07e5fb1163fc3888f5c9d8a55a4898f9e
commit 0717a0f07e5fb1163fc3888f5c9d8a55a4898f9e
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:53 2013 +0200
Removed parameters to function 'open_window_menu_core' that were not used
diff --git a/src/winmenu.c b/src/winmenu.c
index 8201747..f2a10ee 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -560,7 +560,7 @@ static void updateMenuForWindow(WMenu * menu, WWindow *
wwin)
wMenuRealize(menu);
}
-static WMenu *open_window_menu_core(WWindow *wwin, int x, int y)
+static WMenu *open_window_menu_core(WWindow *wwin)
{
WScreen *scr = wwin->screen_ptr;
WMenu *menu;
@@ -607,7 +607,7 @@ void OpenWindowMenu(WWindow *wwin, int x, int y, int
keyboard)
{
WMenu *menu;
- menu = open_window_menu_core(wwin, x, y);
+ menu = open_window_menu_core(wwin);
if (!menu)
return;
@@ -630,7 +630,7 @@ void OpenWindowMenu2(WWindow *wwin, int x, int y, int
keyboard)
int i;
WMenu *menu;
- menu = open_window_menu_core(wwin, x, y);
+ menu = open_window_menu_core(wwin);
if (!menu)
return;
@@ -653,7 +653,7 @@ void OpenMiniwindowMenu(WWindow * wwin, int x, int y)
{
WMenu *menu;
- menu = open_window_menu_core(wwin, x, y);
+ menu = open_window_menu_core(wwin);
if (!menu)
return;
http://repo.or.cz/w/wmaker-crm.git/commit/c42d6822de0a98fb42615460407f6639fcf243c3
commit c42d6822de0a98fb42615460407f6639fcf243c3
Author: Christophe CURIS <[email protected]>
Date: Sun Oct 13 15:41:52 2013 +0200
Removed parameter to function 'create_tab_icon_workspace' that was not used
diff --git a/src/winspector.c b/src/winspector.c
index b32ddca..d861b9c 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -159,7 +159,7 @@ static InspectorPanel *createInspectorForWindow(WWindow
*wwin, int xpos, int ypo
static void create_tab_window_attributes(WWindow *wwin, InspectorPanel *panel,
int frame_width);
static void create_tab_window_advanced(WWindow *wwin, InspectorPanel *panel,
int frame_width);
-static void create_tab_icon_workspace(WWindow *wwin, InspectorPanel *panel,
int frame_width);
+static void create_tab_icon_workspace(WWindow *wwin, InspectorPanel *panel);
static void create_tab_app_specific(WWindow *wwin, InspectorPanel *panel, int
frame_width);
static void make_keys(void)
@@ -1168,7 +1168,7 @@ static InspectorPanel *createInspectorForWindow(WWindow
*wwin, int xpos, int ypo
/**** attributes ****/
create_tab_window_attributes(wwin, panel, frame_width);
create_tab_window_advanced(wwin, panel, frame_width);
- create_tab_icon_workspace(wwin, panel, frame_width);
+ create_tab_icon_workspace(wwin, panel);
create_tab_app_specific(wwin, panel, frame_width);
/* if the window is a transient, don't let it have a miniaturize button
*/
@@ -1474,7 +1474,7 @@ static void create_tab_window_advanced(WWindow *wwin,
InspectorPanel *panel, int
}
}
-static void create_tab_icon_workspace(WWindow *wwin, InspectorPanel *panel,
int frame_width)
+static void create_tab_icon_workspace(WWindow *wwin, InspectorPanel *panel)
{
int i = 0;
-----------------------------------------------------------------------
Summary of changes:
src/event.c | 29 +++++++++++++++++------------
src/moveres.c | 4 ++--
src/startup.c | 2 ++
src/winmenu.c | 8 ++++----
src/winspector.c | 6 +++---
5 files changed, 28 insertions(+), 21 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].