devilhorns pushed a commit to branch master.

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

commit 43fa91f428951b1a1568440b45eafd0f2be0aa9b
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Thu Feb 11 11:21:50 2016 -0500

    ecore-x: Fix compiler warnings about return values
    
    This is an "oopsie" fix from my previous commit wrt adding EINA_SAFETY
    checks. I made an oopsie and didn't realize that these 2 functions
    were expecting int returns.
    
    @fix
    
    Signed-off-by: Chris Michael <cpmich...@osg.samsung.com>
---
 src/lib/ecore_x/xlib/ecore_x.c       | 2 +-
 src/lib/ecore_x/xlib/ecore_x_atoms.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c
index 7e9d217..7f2dc52 100644
--- a/src/lib/ecore_x/xlib/ecore_x.c
+++ b/src/lib/ecore_x/xlib/ecore_x.c
@@ -1109,7 +1109,7 @@ ecore_x_dpi_get(void)
    Screen *s;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, 0);
    s = DefaultScreenOfDisplay(_ecore_x_disp);
    if (s->mwidth <= 0)
      return 75;
diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c 
b/src/lib/ecore_x/xlib/ecore_x_atoms.c
index b4bb518..5276238 100644
--- a/src/lib/ecore_x/xlib/ecore_x_atoms.c
+++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c
@@ -45,11 +45,9 @@ EAPI Ecore_X_Atom
 ecore_x_atom_get(const char *name)
 {
    Ecore_X_Atom atom;
-   if (!_ecore_x_disp)
-     return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, 0);
    atom = XInternAtom(_ecore_x_disp, name, False);
    if (_ecore_xlib_sync) ecore_x_sync();
    return atom;

-- 


Reply via email to