more warn-- in efl tree.

SVN revision: 79314
This commit is contained in:
Carsten Haitzler 2012-11-15 05:19:14 +00:00
parent dc0946e205
commit 66a43d2a7a
7 changed files with 23 additions and 23 deletions

View File

@ -3480,9 +3480,11 @@ static void
doif(void) doif(void)
{ {
int flab1, flab2; int flab1, flab2;
#if 0
int ifindent; int ifindent;
ifindent = stmtindent; /* save the indent of the "if" instruction */ ifindent = stmtindent; /* save the indent of the "if" instruction */
#endif
flab1 = getlabel(); /* get label number for false branch */ flab1 = getlabel(); /* get label number for false branch */
test(flab1, TRUE, FALSE); /*get expression, branch to flab1 if false */ test(flab1, TRUE, FALSE); /*get expression, branch to flab1 if false */
statement(NULL, FALSE); /* if true, do a statement */ statement(NULL, FALSE); /* if true, do a statement */

View File

@ -661,7 +661,7 @@ assemble(FILE * fout, FILE * fin)
constvalue *constptr; constvalue *constptr;
cell mainaddr; cell mainaddr;
int nametable, tags, libraries, publics, natives, pubvars; int nametable, tags, libraries, publics, natives, pubvars;
int cod, defsize; int cod;
#if !defined NDEBUG #if !defined NDEBUG
/* verify that the opcode list is sorted (skip entry 1; it is reserved /* verify that the opcode list is sorted (skip entry 1; it is reserved
@ -775,7 +775,7 @@ assemble(FILE * fout, FILE * fin)
// #ifdef WORDS_BIGENDIAN // #ifdef WORDS_BIGENDIAN
// hdr.flags|=AMX_FLAG_BIGENDIAN; // hdr.flags|=AMX_FLAG_BIGENDIAN;
// #endif // #endif
defsize = hdr.defsize = sizeof(FUNCSTUB); hdr.defsize = sizeof(FUNCSTUB);
assert((hdr.defsize % sizeof(cell)) == 0); assert((hdr.defsize % sizeof(cell)) == 0);
publics = hdr.publics = sizeof hdr; /* public table starts right after the header */ publics = hdr.publics = sizeof hdr; /* public table starts right after the header */
natives = hdr.natives = hdr.publics + numpublics * sizeof(FUNCSTUB); natives = hdr.natives = hdr.publics + numpublics * sizeof(FUNCSTUB);

View File

@ -425,27 +425,21 @@ main(void)
Font_Entry *fe; Font_Entry *fe;
eina_init(); eina_init();
_evas_cserve2_debug_log_dom = eina_log_domain_register _evas_cserve2_debug_log_dom = eina_log_domain_register
("evas_cserve2_debug", EINA_COLOR_BLUE); ("evas_cserve2_debug", EINA_COLOR_BLUE);
if (!_server_connect()) if (!_server_connect())
{ {
ERR("Could not connect to server."); ERR("Could not connect to server.");
return -1; return -1;
} }
_debug_msg_send(); _debug_msg_send();
fonts = _debug_msg_read(); fonts = _debug_msg_read();
EINA_LIST_FREE(fonts, fe) EINA_LIST_FREE(fonts, fe)
{ {
_font_entry_print(fe); _font_entry_print(fe);
_font_entry_free(fe); _font_entry_free(fe);
} }
_server_disconnect(); _server_disconnect();
eina_shutdown(); eina_shutdown();
return 0;
} }

View File

@ -328,7 +328,11 @@ _slave_proc_path_get(const char *name)
return eina_stringshare_add(name); return eina_stringshare_add(name);
} }
getcwd(cwd, sizeof(cwd)); if (!getcwd(cwd, sizeof(cwd)))
{
WRN("getcwd() write returned < 0.");
return NULL;
}
snprintf(buf, sizeof(buf), "%s/%s", cwd, name); snprintf(buf, sizeof(buf), "%s/%s", cwd, name);
if (!access(buf, X_OK)) if (!access(buf, X_OK))
return eina_stringshare_add(buf); return eina_stringshare_add(buf);
@ -475,8 +479,10 @@ _slave_thread_cb(void *data)
continue; continue;
} }
sd->cmdanswer = sd->cb(sd, &cmd, sd->cmddata, sd->cb_data); sd->cmdanswer = sd->cb(sd, &cmd, sd->cmddata, sd->cb_data);
write(sd->write_fd, &cmd, sizeof(cmd)); if (write(sd->write_fd, &cmd, sizeof(cmd)) < 0)
{
WRN("_slave_thread_cb() write returned < 0.");
}
n = read(sd->read_fd, &cmd, sizeof(cmd)); n = read(sd->read_fd, &cmd, sizeof(cmd));
} }

View File

@ -227,21 +227,16 @@ int
main(void) main(void)
{ {
eina_init(); eina_init();
_evas_cserve2_usage_log_dom = eina_log_domain_register _evas_cserve2_usage_log_dom = eina_log_domain_register
("evas_cserve2_usage", EINA_COLOR_BLUE); ("evas_cserve2_usage", EINA_COLOR_BLUE);
if (!_server_connect()) if (!_server_connect())
{ {
ERR("Could not connect to server."); ERR("Could not connect to server.");
return -1; return -1;
} }
_usage_msg_send(); _usage_msg_send();
_usage_msg_read(); _usage_msg_read();
_server_disconnect(); _server_disconnect();
eina_shutdown(); eina_shutdown();
return 0;
} }

View File

@ -115,7 +115,6 @@ _embryo_func_get(Embryo_Program *ep, int idx, char *funcname)
static int static int
_embryo_var_get(Embryo_Program *ep, int idx, char *varname, Embryo_Cell *ep_addr) _embryo_var_get(Embryo_Program *ep, int idx, char *varname, Embryo_Cell *ep_addr)
{ {
Embryo_Header *hdr; Embryo_Header *hdr;
Embryo_Func_Stub *var; Embryo_Func_Stub *var;
@ -207,6 +206,8 @@ _embryo_program_init(Embryo_Program *ep, void *code)
#endif #endif
ep->flags = EMBRYO_FLAG_RELOC; ep->flags = EMBRYO_FLAG_RELOC;
#ifdef WORDS_BIGENDIAN
/* until we do more... this is only used for bigendian */
{ {
Embryo_Cell cip, code_size, cip_end; Embryo_Cell cip, code_size, cip_end;
Embryo_Cell *code; Embryo_Cell *code;
@ -222,9 +223,10 @@ _embryo_program_init(Embryo_Program *ep, void *code)
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
embryo_swap_32(&(code[cip])); embryo_swap_32(&(code[cip]));
#endif #endif
} }
} }
#endif
/* init native api for handling floating point - default in embryo */ /* init native api for handling floating point - default in embryo */
_embryo_args_init(ep); _embryo_args_init(ep);
_embryo_fp_init(ep); _embryo_fp_init(ep);
@ -734,11 +736,9 @@ embryo_data_address_get(Embryo_Program *ep, Embryo_Cell addr)
EAPI Embryo_Cell EAPI Embryo_Cell
embryo_data_heap_push(Embryo_Program *ep, int cells) embryo_data_heap_push(Embryo_Program *ep, int cells)
{ {
Embryo_Header *hdr;
Embryo_Cell addr; Embryo_Cell addr;
if ((!ep) || (!ep->base)) return EMBRYO_CELL_NONE; if ((!ep) || (!ep->base)) return EMBRYO_CELL_NONE;
hdr = (Embryo_Header *)ep->base;
if (ep->stk - ep->hea - (cells * sizeof(Embryo_Cell)) < STKMARGIN) if (ep->stk - ep->hea - (cells * sizeof(Embryo_Cell)) < STKMARGIN)
return EMBRYO_CELL_NONE; return EMBRYO_CELL_NONE;
addr = ep->hea; addr = ep->hea;

View File

@ -34,6 +34,7 @@ evas_image_load_file_head_webp(Image_Entry *ie, const char *file, const char *ke
size_t header_size = 30; size_t header_size = 30;
uint8_t header[30]; uint8_t header[30];
// XXX: use eina_file to mmap things
f = fopen(file, "rb"); f = fopen(file, "rb");
if (!f) if (!f)
{ {
@ -72,9 +73,10 @@ evas_image_load_file_data_webp(Image_Entry *ie, const char *file, const char *ke
{ {
FILE *f; FILE *f;
size_t file_size; size_t file_size;
uint8_t *data, *decoded, *surface; void *data, *decoded, *surface;
int width, height; int width, height;
// XXX: use eina_file to mmap things
f = fopen(file, "rb"); f = fopen(file, "rb");
if (!f) if (!f)
{ {
@ -121,6 +123,7 @@ evas_image_load_file_data_webp(Image_Entry *ie, const char *file, const char *ke
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
goto free_data; goto free_data;
} }
// XXX: this copy of the surface is inefficient
memcpy(surface, decoded, width * height * 4); memcpy(surface, decoded, width * height * 4);
evas_common_image_premul(ie); evas_common_image_premul(ie);