Enlightenment CVS committal
Author : kwo
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore
Modified Files:
Ecore_Data.h ecore_events.c ecore_exe.c ecore_hash.c
Log Message:
Add const, fix warnings.
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/Ecore_Data.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- Ecore_Data.h 27 Oct 2006 03:52:28 -0000 1.23
+++ Ecore_Data.h 5 Nov 2006 16:42:30 -0000 1.24
@@ -243,7 +243,7 @@
/* Retrieve and store data into the hash */
EAPI void *ecore_hash_get(Ecore_Hash *hash, const void *key);
EAPI int ecore_hash_set(Ecore_Hash *hash, void *key, void *value);
- EAPI void *ecore_hash_remove(Ecore_Hash *hash, void *key);
+ EAPI void *ecore_hash_remove(Ecore_Hash *hash, const void *key);
EAPI void ecore_hash_dump_graph(Ecore_Hash *hash);
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_events.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ecore_events.c 23 Jun 2006 06:38:52 -0000 1.23
+++ ecore_events.c 5 Nov 2006 16:42:30 -0000 1.24
@@ -380,8 +380,6 @@
ef->loop_data = ef->func_start(ef->data);
for (ll = (Ecore_List2 *)events; ll; ll = ll->next)
{
- Ecore_Event *e;
-
e = (Ecore_Event *)ll;
if (!ef->func_filter(ef->loop_data, ef->data,
e->type, e->event))
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_exe.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- ecore_exe.c 29 Jul 2006 10:05:13 -0000 1.65
+++ ecore_exe.c 5 Nov 2006 16:42:30 -0000 1.66
@@ -52,12 +52,12 @@
EAPI int ECORE_EXE_EVENT_ERROR = 0;
static Ecore_Exe *exes = NULL;
-static char *shell = NULL;
+static const char *shell = NULL;
/* FIXME: This errno checking stuff should be put elsewhere for everybody to
use.
* For now it lives here though, just to make testing easier.
*/
-static int _ecore_exe_check_errno(int result, char *file, int line);
+static int _ecore_exe_check_errno(int result, const char *file, int
line);
#define E_IF_NO_ERRNO(result, foo, ok) \
while (((ok) = _ecore_exe_check_errno( (result) = (foo), __FILE__,
__LINE__)) == -1) sleep(1); \
@@ -70,7 +70,7 @@
if (((ok) = _ecore_exe_check_errno( (result) = (foo), __FILE__, __LINE__)))
static int
-_ecore_exe_check_errno(int result, char *file, int line)
+_ecore_exe_check_errno(int result, const char *file, int line)
{
int saved_errno = errno;
@@ -306,7 +306,9 @@
/* Create some pipes. */
if (ok)
- E_IF_NO_ERRNO_NOLOOP(result, pipe(statusPipe), ok);
+ E_IF_NO_ERRNO_NOLOOP(result, pipe(statusPipe), ok)
+ {
+ }
if (ok && (flags & ECORE_EXE_PIPE_ERROR))
E_IF_NO_ERRNO_NOLOOP(result, pipe(errorPipe), ok)
{
@@ -432,13 +434,13 @@
{ /* Setup the error stuff. */
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_error, F_SETFL,
- O_NONBLOCK), ok);
+ O_NONBLOCK), ok) {}
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_error, F_SETFD,
- FD_CLOEXEC), ok);
+ FD_CLOEXEC), ok) {}
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_error_x, F_SETFD,
- FD_CLOEXEC), ok);
+ FD_CLOEXEC), ok) {}
{
exe->error_fd_handler =
ecore_main_fd_handler_add(exe->child_fd_error,
@@ -453,13 +455,13 @@
{ /* Setup the read stuff. */
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_read, F_SETFL,
- O_NONBLOCK), ok);
+ O_NONBLOCK), ok) {}
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_read, F_SETFD,
- FD_CLOEXEC), ok);
+ FD_CLOEXEC), ok) {}
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_read_x, F_SETFD,
- FD_CLOEXEC), ok);
+ FD_CLOEXEC), ok) {}
{
exe->read_fd_handler =
ecore_main_fd_handler_add(exe->child_fd_read,
@@ -474,13 +476,13 @@
{ /* Setup the write stuff. */
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_write, F_SETFL,
- O_NONBLOCK), ok);
+ O_NONBLOCK), ok) {}
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_write, F_SETFD,
- FD_CLOEXEC), ok);
+ FD_CLOEXEC), ok) {}
E_IF_NO_ERRNO(result,
fcntl(exe->child_fd_write_x, F_SETFD,
- FD_CLOEXEC), ok);
+ FD_CLOEXEC), ok) {}
{
exe->write_fd_handler =
ecore_main_fd_handler_add(exe->child_fd_write,
@@ -549,7 +551,7 @@
return 0;
exe->write_data_buf = buf;
- memcpy(exe->write_data_buf + exe->write_data_size, data, size);
+ memcpy((char *)exe->write_data_buf + exe->write_data_size, data, size);
exe->write_data_size += size;
if (exe->write_fd_handler)
@@ -1249,8 +1251,7 @@
if ((!token) && (num_tokens))
{
int i = 0;
- char *token;
-
+
if (!(buf = strdup(exe_cmd)))
return;
@@ -1449,7 +1450,7 @@
}
static int
-_ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler * fd_handler)
+_ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler * fd_handler
__UNUSED__)
{
Ecore_Exe *exe;
@@ -1491,7 +1492,7 @@
return;
count = write(exe->child_fd_write,
- exe->write_data_buf + exe->write_data_offset,
+ (char *)exe->write_data_buf + exe->write_data_offset,
exe->write_data_size - exe->write_data_offset);
if (count < 1)
{
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_hash.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ecore_hash.c 6 Sep 2006 07:06:55 -0000 1.29
+++ ecore_hash.c 5 Nov 2006 16:42:30 -0000 1.30
@@ -386,7 +386,7 @@
* @ingroup Ecore_Data_Hash_ADT_Data_Group
*/
EAPI void *
-ecore_hash_remove(Ecore_Hash *hash, void *key)
+ecore_hash_remove(Ecore_Hash *hash, const void *key)
{
Ecore_Hash_Node *node = NULL;
Ecore_Hash_Node *list;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs