kwo pushed a commit to branch master.
commit 14b61c1cd1893d6dac5c3d4d5e356670b9790b71
Author: Kim Woelders <[email protected]>
Date: Sat Jul 6 07:04:32 2013 +0200
Fix potential use of uninitialised data.
Reported by clang, will never happen as ArrangeEwinXY will never be
called with ewin = NULL.
---
src/arrange.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/arrange.c b/src/arrange.c
index 57c2a4f..8409aa3 100644
--- a/src/arrange.c
+++ b/src/arrange.c
@@ -855,12 +855,11 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
int i, num;
RectBox *fixed, *ret, newrect;
+ *px = *py = 0;
+
if (!ewin)
return;
- fixed = NULL;
- *px = *py = 0;
-
EwinListGetAll(&num);
if (num <= 1)
{
@@ -868,6 +867,7 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
return;
}
+ fixed = NULL;
ArrangeGetRectList(&fixed, &num, NULL, NULL, ewin);
newrect.data = ewin;
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev