[PATCH 01/11] WINGs: Value stored to 'columnX' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- WINGs/wbrowser.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c index d390407..03b75ad 100644 --- a/WINGs/wbrowser.c +++ b/WINGs/wbrowser.c @@ -375,8 +375,6 @@ void WMSetBrowserTitled(WMBrowser *

[PATCH] clang dead assignments

2014-05-18 Thread Amadeusz Sławiński
Hey, so seeing as various utilities report different stuff, here are patches for dead assignments reported by clang. Amadeusz -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

[PATCH 03/11] wrlib: Value stored to 'bptr' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- wrlib/load_jpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrlib/load_jpeg.c b/wrlib/load_jpeg.c index 178d5d9..ded519e 100644 --- a/wrlib/load_jpeg.c +++ b/wrlib/load_jpeg.c @@ -136,7 +136,8 @@ RImage

[PATCH 08/11] util: Value stored to 'count' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- util/wmsetbg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/wmsetbg.c b/util/wmsetbg.c index b52f950..775cc19 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -868,7 +868,6 @@ static int readmsg(int fd, char *buffer, int size)

[PATCH 02/11] wrlib: Value stored to 'i'|'tmpc' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- wrlib/save_xpm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/wrlib/save_xpm.c b/wrlib/save_xpm.c index 3e6c976..08cb52e 100644 --- a/wrlib/save_xpm.c +++ b/wrlib/save_xpm.c @@ -87,7 +87,6 @@ static Bool addcolor(XPMColor ** list,

[PATCH 04/11] util: Value stored to 'ret' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- util/wmmenugen_parse_xdg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/wmmenugen_parse_xdg.c b/util/wmmenugen_parse_xdg.c index f5cdb58..384f9ee 100644 --- a/util/wmmenugen_parse_xdg.c +++ b/util/wmmenugen_parse_xdg.c @@ -363,7

[PATCH 10/11] WINGs: Value stored to 'fh'|'fy' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- WINGs/wframe.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/WINGs/wframe.c b/WINGs/wframe.c index 38547e7..336f839 100644 --- a/WINGs/wframe.c +++ b/WINGs/wframe.c @@ -82,9 +82,6 @@ static void paintFrame(Frame * fPtr)

[PATCH 05/11] wmaker: Value stored to 'w1' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- src/misc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/misc.c b/src/misc.c index 4d008a3..63e7158 100644 --- a/src/misc.c +++ b/src/misc.c @@ -279,7 +279,6 @@ char *ShrinkString(WMFont *font, const char *string, int width)

[PATCH 06/11] wrlib: Value stored to 'nptr' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- wrlib/rotate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/wrlib/rotate.c b/wrlib/rotate.c index f04b95e..fead8ae 100644 --- a/wrlib/rotate.c +++ b/wrlib/rotate.c @@ -77,7 +77,6 @@ RImage *RRotateImage(RImage * image, float angle)

[PATCH 07/11] WINGs: Value stored to 'aw' is never read

2014-05-18 Thread Amadeusz Sławiński
Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- WINGs/wpanel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/WINGs/wpanel.c b/WINGs/wpanel.c index 1c1d04f..6e2f9f4 100644 --- a/WINGs/wpanel.c +++ b/WINGs/wpanel.c @@ -545,13 +545,11 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen *

Re: [PATCH 09/11] WINGs: Value stored to 'found' is never read

2014-05-18 Thread Amadeusz Sławiński
On Sun, 18 May 2014 14:54:22 +0100 Carlos R. Mafra crma...@gmail.com wrote: On Sun, 18 May 2014 at 13:32:48 +0200, Amadeusz Sławiński wrote: Signed-off-by: Amadeusz Sławiński am...@asmblr.net --- WINGs/wfilepanel.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 00/15] WINGs: fixes for stuff reported by Coverity

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr Hello, This serie of patch fixes the code in WINGs toolkit that are related to 17 bugs reported by Coverity. 5 bugs should have been fixed from WUtil fixes (commit 515fb74c0c). It does not fix everything, there are 5 more bugs which will probably

[PATCH 03/15] WINGs: fix check for NULL pointer in WMText selection (Coverity #50067)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, there is a small check for NULL pointer when handling triple-click selection in a WMText, however this check is only partially implemented so the code would crash later anyway. This patch implement an appropriate skip to

[PATCH 02/15] WINGs: do not crash on NULL title in WMSetWindowTitle (Coverity #50046)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, despite apparent checks the function would fail if trying to set a NULL title. Instead of trying to do over-complicated things we just ignore (with a warning if NDEBUG is not set) the case. If user wants an empty title, the

[PATCH 01/15] WINGs: remove unreachable code in paintMenuEntry (Coverity #50042)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by coverity, the case 'index 0' cannot be true because it was already earlier and handled with an early return. Signed-off-by: Christophe CURIS christophe.cu...@free.fr --- WINGs/wpopupbutton.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH 05/15] WINGs: fix memory leak in WMGetBrowserPaths (Coverity #50111)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As reported by Coverity, in the (rare) case where the wstrlcat would fail the array for the result would not be freed before returning. Signed-off-by: Christophe CURIS christophe.cu...@free.fr --- WINGs/wbrowser.c | 1 + 1 file changed, 1

[PATCH 06/15] WINGs: fix memory leak in WMCreateTextForDocumentType (Coverity #50118)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, a temporary WMArray was not freed after use. Signed-off-by: Christophe CURIS christophe.cu...@free.fr --- WINGs/wtext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/WINGs/wtext.c b/WINGs/wtext.c index

[PATCH 08/15] WINGs: fix memory leak in requestHandler (Coverity #50135)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, the data returned by WMGetTextSelectedStream are actually a newly allocated buffer, so we need to release it when we're done with it. Signed-off-by: Christophe CURIS christophe.cu...@free.fr --- WINGs/wtext.c | 1 + 1 file

[PATCH 11/15] WINGs: fix incorrect usage of direction variable in updateStartForCurrentTextBlock (Coverity #50192)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, the variable 'dir' is passed by reference because the function may update it; as it is never NULL (the function is local) checking for that does not make sense. From the actual usage, it seems logical that the check should

[PATCH 09/15] WINGs: fix memory leak in requestHandler (Coverity #50136)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, the allocated temporary storage was not freed. As an allocation is not needed here, replaced by a local storage. --- WINGs/wtextfield.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH 12/15] WINGs: fix check for NULL pointer in WMFilePanel (Coverity #50195)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, there is a NULL pointer check at the end of the function 'deleteFile' (which happens to not be necessary because wfree was made to accept NULL pointers), however there are many things done before that assumes the pointer is

[PATCH 13/15] WINGs: fix possible NULL pointer dereference (Coverity #50197)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, the 'paintItem' function in the WMBrowser widget is checking for nullity of its text argument, but before that it called the strlen function which crashes on NULL pointer. This patch moves the strlen call to the right place

[PATCH 14/15] WINGs: fix probable crash in drag'n'drop (Coverity #50264)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As reported by Coverity, the structure containing the callback functions to handle the drag-and-drop actions could be freed but later re-used. The correct behaviour is to keep the allocated memory for the structure. Signed-off-by: Christophe CURIS

[PATCH 15/15] WINGs: removed unnecessary gotos in handleTextKeyPress

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr When the condition can be simply checked in an if, it is better to do that than to use a flow breaking goto. Signed-off-by: Christophe CURIS christophe.cu...@free.fr --- WINGs/wtext.c | 10 ++ 1 file changed, 2 insertions(+), 8

[PATCH 10/15] WINGs: fix possible NULL pointer dereference in WMFreeColorPanel (Coverity #50189)

2014-05-18 Thread Christophe
From: Christophe CURIS christophe.cu...@free.fr As pointed by Coverity, the code was checking for NULL pointer to avoid misbehaviour, but it actually dereferenced the pointer beforehand so the crash would still happen. Signed-off-by: Christophe CURIS christophe.cu...@free.fr ---

[PATCH] Fix for commit 8e454ae (WPrefs: fix segfault when image not found)

2014-05-18 Thread Doug Torrance
Somehow I missed that my original patch did exactly the opposite of what it should have. Carlos, could you patch this over the original? Thanks! --- WPrefs.app/Appearance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c

Re: [PATCH] Fix for commit 8e454ae (WPrefs: fix segfault when image not found)

2014-05-18 Thread Carlos R. Mafra
On Sun, 18 May 2014 at 14:41:14 -0500, Doug Torrance wrote: Somehow I missed that my original patch did exactly the opposite of what it should have. Carlos, could you patch this over the original? Done. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Re: [PATCH 7/7] WPrefs: reorder code from commit e6b3a5809b to make it look more logical

2014-05-18 Thread Doug Torrance
On 05/17/2014 09:43 AM, Christophe wrote: From: Christophe CURIS christophe.cu...@free.fr It makes code simpler and less prone to errors. --- WPrefs.app/Appearance.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WPrefs.app/Appearance.c

Re: [PATCH 7/7] WPrefs: reorder code from commit e6b3a5809b to make it look more logical

2014-05-18 Thread Carlos R. Mafra
On Sun, 18 May 2014 at 15:45:35 -0500, Doug Torrance wrote: On 05/17/2014 09:43 AM, Christophe wrote: From: Christophe CURIS christophe.cu...@free.fr It makes code simpler and less prone to errors. --- WPrefs.app/Appearance.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH] WPrefs: updates to FrameBorderColor/FrameSelectedBorderColor options

2014-05-18 Thread Doug Torrance
In response to Amadeusz's comments regarding my patch WPrefs: Add ability to edit FrameBorderColor/FrameSelectedBorderColor, this new patch attempts to reduce the confusion between focused and selected windows. In particular, only the frame border color for non-selected windows appears in the