WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=579adfd567794e5d8f812c95014a9eeeba2c46d5

commit 579adfd567794e5d8f812c95014a9eeeba2c46d5
Author: Xavi Artigas <xavierarti...@yahoo.es>
Date:   Wed Nov 15 02:59:59 2017 -0800

    Wiki page eo-classes.md changed with summary [Added EINA_UNUSED] by Xavi 
Artigas
---
 pages/develop/tutorial/c/eo-classes.md.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pages/develop/tutorial/c/eo-classes.md.txt 
b/pages/develop/tutorial/c/eo-classes.md.txt
index 45e9e5ed..f9e139e0 100644
--- a/pages/develop/tutorial/c/eo-classes.md.txt
+++ b/pages/develop/tutorial/c/eo-classes.md.txt
@@ -182,29 +182,29 @@ typedef struct
 } Example_Rectangle_Data;
 ```
 
-And now fill-in the setters and getters for ``width`` and ``height``. They 
just provide access to the private variables, so the code is very simple:
+And now fill-in the setters and getters for ``width`` and ``height``. They 
just provide access to the private variables, so the code is very simple. Also, 
none of the ``Eo *obj`` is not going to be used, so it is a good idea to mark 
them with ``EINA_UNUSED`` to avoid compiler warnings:
 
 ```c
 EOLIAN static void
-_example_rectangle_width_set(Eo *obj, Example_Rectangle_Data *pd, int width)
+_example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, 
int width)
 {
    pd->width = width;
 }
 
 EOLIAN static int
-_example_rectangle_width_get(Eo *obj, Example_Rectangle_Data *pd)
+_example_rectangle_width_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
 {
    return pd->width;
 }
 
 EOLIAN static void
-_example_rectangle_height_set(Eo *obj, Example_Rectangle_Data *pd, int height)
+_example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, 
int height)
 {
    pd->height = height;
 }
 
 EOLIAN static int
-_example_rectangle_height_get(Eo *obj, Example_Rectangle_Data *pd)
+_example_rectangle_height_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
 {
    return pd->height;
 }
@@ -214,7 +214,7 @@ Lastly, calculate the area of the rectangle in the 
``_example_rectangle_area()``
 
 ```c
 EOLIAN static int
-_example_rectangle_area(Eo *obj, Example_Rectangle_Data *pd)
+_example_rectangle_area(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
 {
    return pd->width * pd->height;
 }

-- 


Reply via email to