On Fri, 24 Jan 2014 11:14:31 +0900 Daniel Juyung Seo <[email protected]>
said:

i don't... get that warning... i don't have it enabled in my CFLAGS... that'll
be why

> Hi raster, I have this warning:
> 
> elm_atspi_bridge.c: In function '_access_object_from_path':
> elm_atspi_bridge.c:196:9: warning: cast to pointer from integer of
> different size [-Wint-to-pointer-cast]
> elm_atspi_bridge.c: In function '_path_from_access_object':
> elm_atspi_bridge.c:209:73: warning: cast from pointer to integer of
> different size [-Wpointer-to-int-cast]
> 
> Can you check that?

but that code is right. - yes there is a cast, but the code is ok. its using an
unsinged long long which should be 64bit on all platforms we care about ... and
uses this as  an object id/handle and this is a superset of any platform (we
care about) where pointers (Eo *) will be 64bit or 32bit.

> Thanks.
> 
> Daniel Juyung Seo (SeoZ)
> 
> 
> 
> On Mon, Jan 13, 2014 at 3:47 PM, Carsten Haitzler <[email protected]>wrote:
> 
> > raster pushed a commit to branch master.
> >
> >
> > http://git.enlightenment.org/core/elementary.git/commit/?id=49b32a3b2565b5aedabf1107b42387b7d0bc6a0d
> >
> > commit 49b32a3b2565b5aedabf1107b42387b7d0bc6a0d
> > Author: Carsten Haitzler (Rasterman) <[email protected]>
> > Date:   Mon Jan 13 15:35:48 2014 +0900
> >
> >     atspi - fix warnhings and use %llu (unsigned long long) or obj handle
> > ---
> >  src/lib/elm_atspi_bridge.c | 10 +++++-----
> >  src/lib/elm_atspi_object.c |  2 +-
> >  2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
> > index 3523322..d308a43 100644
> > --- a/src/lib/elm_atspi_bridge.c
> > +++ b/src/lib/elm_atspi_bridge.c
> > @@ -20,7 +20,7 @@
> >
> >  #define ELM_ACCESS_OBJECT_PATH_ROOT "root"
> >  #define ELM_ACCESS_OBJECT_PATH_PREFIX  "/org/a11y/atspi/accessible/"
> > -#define ELM_ACCESS_OBJECT_REFERENCE_TEMPLATE
> > ELM_ACCESS_OBJECT_PATH_PREFIX "%u"
> > +#define ELM_ACCESS_OBJECT_REFERENCE_TEMPLATE
> > ELM_ACCESS_OBJECT_PATH_PREFIX "%llu"
> >
> >  static int _init_count = 0;
> >  static Eldbus_Connection *_a11y_bus = NULL;
> > @@ -179,9 +179,9 @@ static Elm_Atspi_Object *
> >  _access_object_from_path(const char *path)
> >  {
> >     EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
> > -   uintptr_t eo_ptr = NULL;
> > +   unsigned long long eo_ptr = 0;
> >     Elm_Atspi_Object *eo = NULL;
> > -   const char* tmp = path;
> > +   const char *tmp = path;
> >
> >     int len = (sizeof(ELM_ACCESS_OBJECT_PATH_PREFIX) / sizeof(char)) - 1;
> >
> > @@ -192,7 +192,7 @@ _access_object_from_path(const char *path)
> >     if (!strcmp(ELM_ACCESS_OBJECT_PATH_ROOT, tmp))
> >       return _root;
> >
> > -   sscanf(tmp, "%u", &eo_ptr);
> > +   sscanf(tmp, "%llu", &eo_ptr);
> >     eo = (Elm_Atspi_Object *)eo_ptr;
> >     return eo_isa(eo, ELM_ATSPI_CLASS) ? eo : NULL;
> >  }
> > @@ -206,7 +206,7 @@ _path_from_access_object(Elm_Atspi_Object *eo)
> >     if (eo == _root)
> >       snprintf(path, sizeof(path), "%s%s", ELM_ACCESS_OBJECT_PATH_PREFIX,
> > ELM_ACCESS_OBJECT_PATH_ROOT);
> >     else
> > -     snprintf(path, sizeof(path), ELM_ACCESS_OBJECT_REFERENCE_TEMPLATE,
> > (uintptr_t)eo);
> > +     snprintf(path, sizeof(path), ELM_ACCESS_OBJECT_REFERENCE_TEMPLATE,
> > (unsigned long long)eo);
> >     return strdup(path);
> >  }
> >
> > diff --git a/src/lib/elm_atspi_object.c b/src/lib/elm_atspi_object.c
> > index 53d8881..ab7979c 100644
> > --- a/src/lib/elm_atspi_object.c
> > +++ b/src/lib/elm_atspi_object.c
> > @@ -184,7 +184,7 @@ _name_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED,
> > va_list *list EINA_UNUSED)
> >  static void
> >  _role_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list
> > EINA_UNUSED)
> >  {
> > -   AtspiRole *ret = ARG_GET(list, int*);
> > +   AtspiRole *ret = ARG_GET(list, AtspiRole *);
> >     Atspi_Object_Data *ad = _pd;
> >
> >     *ret = ad->role;
> >
> > --
> >
> >
> >
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to