On 01/04/12 13:20, eva...@evadim.ru wrote:
> Jérôme Pinot <ngc...@gmail.com> писал(а) в своём письме Mon, 02 Jan 2012
> 10:47:29 +0100:
>
> >Hi again :-)
> >
> >A new release of ePeriodique which is a graphical application that
> >display the periodic table of the elements. It uses elementary and edje.
> >
>
> Hi!
>
> I'm made ebuild for it for gentoo linux. It compiles, but after start -
> terminated.
> Build log in attach, in it I see few warnings and QA messages.
Thanks for your report!
>[...]
>
> In file included from /usr/include/string.h:642:0,
> from
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:28:
> In function 'memcpy',
> inlined from 'popup_data' at
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:110:9:
> /usr/include/bits/string3.h:52:3: warning: call to __builtin___memcpy_chk
> will always overflow destination buffer
> In file included from /usr/include/stdio.h:930:0,
> from
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:29:
> In function 'snprintf',
> inlined from 'elm_main' at
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:324:13:
> /usr/include/bits/stdio2.h:65:3: warning: call to __builtin___snprintf_chk
> will always overflow destination buffer
> In function 'snprintf',
> inlined from 'elm_main' at
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:336:13:
> /usr/include/bits/stdio2.h:65:3: warning: call to __builtin___snprintf_chk
> will always overflow destination buffer
> In function 'snprintf',
> inlined from 'elm_main' at
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:355:13:
> /usr/include/bits/stdio2.h:65:3: warning: call to __builtin___snprintf_chk
> will always overflow destination buffer
> In function 'snprintf',
> inlined from 'elm_main' at
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:357:13:
> /usr/include/bits/stdio2.h:65:3: warning: call to __builtin___snprintf_chk
> will always overflow destination buffer
> In function 'snprintf',
> inlined from 'elm_main' at
> /var/tmp/portage/sci-chemistry/eperiodique-0.2/work/eperiodique-0.2/src/main.c:359:13:
> /usr/include/bits/stdio2.h:65:3: warning: call to __builtin___snprintf_chk
> will always overflow destination buffer
Could you try this patch?
diff --git a/src/main.c b/src/main.c
index ee04dd2..6aeab48 100644
--- a/src/main.c
+++ b/src/main.c
@@ -107,7 +107,7 @@ popup_data(void *data, Evas *e, Evas_Object *obj, void
*event_info)
Evas_Object *popup, *table, *image, *frame, *label;
/* get the element's index back */
- memcpy(&index, &data, sizeof data);
+ memcpy(&index, &data, sizeof(index));
/* prepare the information window */
popup = elm_win_inwin_add(window);
@@ -252,8 +252,8 @@ elm_main(int argc, char **argv)
int opt, i;
char *theme = "default";
char buffer[PATH_MAX];
- char string[2];
- char color[7];
+ char string[3];
+ char color[8];
int color1, color2, color3;
Evas_Object *background, *element, *cell, *wsize;
Evas_Object *table, *separator, *edje;
@@ -321,7 +321,7 @@ elm_main(int argc, char **argv)
elm_layout_file_set(element, buffer, "numbers");
evas_object_size_hint_weight_set(element, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(element, EVAS_HINT_FILL, EVAS_HINT_FILL);
- snprintf(string, sizeof(i), "%d", i);
+ snprintf(string, sizeof(string), "%d", i);
elm_object_part_text_set(element, "number", string);
elm_table_pack(table, element, i, 0, 1, 1);
elm_object_tooltip_text_set(element, _("group"));
@@ -333,7 +333,7 @@ elm_main(int argc, char **argv)
elm_layout_file_set(element, buffer, "numbers");
evas_object_size_hint_weight_set(element, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(element, EVAS_HINT_FILL, EVAS_HINT_FILL);
- snprintf(string, sizeof(i), "%d", i);
+ snprintf(string, sizeof(string), "%d", i);
elm_object_part_text_set(element, "number", string);
elm_table_pack(table, element, 0, i, 1, 1);
elm_object_tooltip_text_set(element, _("period"));
@@ -352,11 +352,11 @@ elm_main(int argc, char **argv)
/* we get colours from edje data field */
edje = elm_layout_edje_get(element);
- snprintf(color, 8, "color%d1", elements_data[i].colour);
+ snprintf(color, sizeof(color), "color%d1", elements_data[i].colour);
color1 = atoi(edje_object_data_get(edje, color));
- snprintf(color, 8, "color%d2", elements_data[i].colour);
+ snprintf(color, sizeof(color), "color%d2", elements_data[i].colour);
color2 = atoi(edje_object_data_get(edje, color));
- snprintf(color, 8, "color%d3", elements_data[i].colour);
+ snprintf(color, sizeof(color), "color%d3", elements_data[i].colour);
color3 = atoi(edje_object_data_get(edje, color));
/* change element background according to group colour */
--
Jérôme Pinot
http://ngc891.blogdns.net/
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users