forked from enlightenment/efl
* edje: Remove some potential bug detected by llvm and gcc.
See: http://local.profusion.mobi:8081/~lfelipe/output-efl/ SVN revision: 42930
This commit is contained in:
parent
b972f930f7
commit
8ea901a753
|
@ -525,7 +525,7 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
|
|||
const char *file = NULL;
|
||||
|
||||
evas_object_image_file_get(im, &file, NULL);
|
||||
if ((file) && (stat(file, &st) != 0))
|
||||
if (!file || (stat(file, &st) != 0))
|
||||
st.st_size = 0;
|
||||
*input_bytes += st.st_size;
|
||||
*input_raw_bytes += im_w * im_h * 4;
|
||||
|
|
|
@ -48,6 +48,7 @@ source_fetch_file(const char *fil, const char *filname)
|
|||
FILE *f;
|
||||
char buf[16 * 1024], *dir = NULL;
|
||||
long sz;
|
||||
size_t tmp;
|
||||
ssize_t dir_len = 0;
|
||||
SrcFile *sf;
|
||||
|
||||
|
@ -65,7 +66,14 @@ source_fetch_file(const char *fil, const char *filname)
|
|||
sf = mem_alloc(SZ(SrcFile));
|
||||
sf->name = mem_strdup(filname);
|
||||
sf->file = mem_alloc(sz + 1);
|
||||
fread(sf->file, sz, 1, f);
|
||||
tmp = fread(sf->file, sz, 1, f);
|
||||
if (tmp != sz)
|
||||
{
|
||||
fprintf(stderr, "%s: Warning filename length doesn't match !\n",
|
||||
progname);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
sf->file[sz] = '\0';
|
||||
fseek(f, 0, SEEK_SET);
|
||||
srcfiles.list = eina_list_append(srcfiles.list, sf);
|
||||
|
|
|
@ -243,7 +243,7 @@ _edje_text_font_get(const char *base, const char *new, char **free_later)
|
|||
|
||||
if (base && (!new))
|
||||
return base;
|
||||
else if ((!base) && new)
|
||||
else if (!base)
|
||||
return new;
|
||||
|
||||
base_style = strstr(base, ":style=");
|
||||
|
|
Loading…
Reference in New Issue