cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a449ca47f16fcd4917224e85e7114745b9f4a845

commit a449ca47f16fcd4917224e85e7114745b9f4a845
Author: Cedric BAIL <[email protected]>
Date:   Fri Jun 27 13:27:33 2014 +0200

    ecore_win32: silent warning by reading the returned value in a useful way.
---
 src/lib/ecore_win32/ecore_win32.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_win32/ecore_win32.c 
b/src/lib/ecore_win32/ecore_win32.c
index 4741a67..dbf10cd 100644
--- a/src/lib/ecore_win32/ecore_win32.c
+++ b/src/lib/ecore_win32/ecore_win32.c
@@ -455,12 +455,14 @@ _ecore_win32_window_procedure(HWND   window,
          if (GetUpdateRect(window, &rect, FALSE))
            {
               PAINTSTRUCT ps;
-              HDC         hdc;
 
-              hdc = BeginPaint(window, &ps);
-              data->update = rect;
-              _ecore_win32_event_handle_expose(data);
-              EndPaint(window, &ps);
+              /* No need to get a variable, just checking if it succeed HDC 
hdc; */
+              if (!BeginPaint(window, &ps))
+                {
+                   data->update = rect;
+                   _ecore_win32_event_handle_expose(data);
+                   EndPaint(window, &ps);
+                }
            }
          return 0;
        }

-- 


Reply via email to