Enlightenment CVS committal
Author : kwo
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_config
Modified Files:
ecore_config.c edb.c ipc_main.c util.c
Log Message:
Fix some compiler warnings.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/ecore_config.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecore_config.c 13 Jan 2004 21:15:23 -0000 1.4
+++ ecore_config.c 18 Jan 2004 09:29:39 -0000 1.5
@@ -7,10 +7,13 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include <limits.h>
+#include <unistd.h>
+#include <util.h>
Ecore_Config_Server *ipc_init(char *name);
-int ipc_quit(void);
+int ipc_exit(void);
static char *ecore_config_type[]={ "undefined", "integer", "float", "string",
"colour" };
@@ -249,9 +252,11 @@
}
+#if 0 /* Not used */
static int ecore_config_val(Ecore_Config_Prop *e,char *val) {
int type = ecore_config_guess_type(val);
return ecore_config_val_typed(e,(void *)val,type); }
+#endif
static int ecore_config_add_typed(Ecore_Config_Bundle *t, const char *key, void* val,
int type) {
@@ -351,7 +356,8 @@
type=ecore_config_guess_type(val);
ret=ecore_config_default_typed(t, key, val, type);
- if (e=ecore_config_get(t,key)) {
+ e=ecore_config_get(t,key);
+ if (e) {
if (type==PT_INT) {
e->step=step;
e->flags|=PF_BOUNDS;
@@ -366,6 +372,8 @@
ecore_config_bound(e);
}
}
+
+ return ret;
}
int ecore_config_default_int(Ecore_Config_Bundle *t,const char *key,int val) {
@@ -377,7 +385,8 @@
int ret;
ret=ecore_config_default_typed(t, key, (void *) val, PT_INT);
- if (e=ecore_config_get(t,key)) {
+ e=ecore_config_get(t,key);
+ if (e) {
e->step=step;
e->flags|=PF_BOUNDS;
e->lo=low;
@@ -401,7 +410,8 @@
int ret;
ret=ecore_config_default_typed(t, key, (void *) &val, PT_FLT);
- if (e=ecore_config_get(t,key)) {
+ e=ecore_config_get(t,key);
+ if (e) {
e->step=(int)(step*ECORE_CONFIG_FLOAT_PRECISION);
e->flags|=PF_BOUNDS;
e->lo=(int)(low*ECORE_CONFIG_FLOAT_PRECISION);
@@ -549,7 +559,7 @@
if (!(buf=malloc(PATH_MAX*sizeof(char))))
return NULL;
snprintf(buf,PATH_MAX,"%s/.ecore/%s/.global",p,name);
- unlink(buf, S_IRWXU);
+ unlink(buf);
free(buf);
}
@@ -566,7 +576,8 @@
if (!(buf=malloc(PATH_MAX*sizeof(char))))
return NULL;
snprintf(buf,PATH_MAX,"%s/.ecore/%s/.global",p,name);
- if (global = creat(buf, S_IRWXU))
+ global = creat(buf, S_IRWXU);
+ if (global)
close(global);
free(buf);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/edb.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- edb.c 12 Jan 2004 16:08:08 -0000 1.5
+++ edb.c 18 Jan 2004 09:29:39 -0000 1.6
@@ -56,7 +56,8 @@
E(0, "Could not read key %s!\n", keys[x]);
}
} else if (!strcmp(type, "str")) {
- if (data = e_db_str_get(db, keys[x])) {
+ data = e_db_str_get(db, keys[x]);
+ if (data) {
if (ecore_config_guess_type(data)==PT_RGB)
ecore_config_set_rgb(b,keys[x],data);
else
@@ -106,6 +107,7 @@
break;
case PT_NIL:
/* currently we do nothing for undefined ojects */
+ break;
}
next=next->next;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/ipc_main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ipc_main.c 13 Jan 2004 21:15:23 -0000 1.5
+++ ipc_main.c 18 Jan 2004 09:29:39 -0000 1.6
@@ -69,11 +69,12 @@
while(e) {
estring_appendf(s,"%s%s: %s",f?"\n":"",e->key,ecore_config_get_type(e));
- if(e->flags&PF_BOUNDS)
+ if(e->flags&PF_BOUNDS) {
if (e->type==PT_FLT)
estring_appendf(s,", range
%le..%le",(float)e->lo/ECORE_CONFIG_FLOAT_PRECISION,(float)e->hi/ECORE_CONFIG_FLOAT_PRECISION);
else
estring_appendf(s,", range %d..%d",e->lo,e->hi);
+ }
f=1;
e=e->next; }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/util.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- util.c 31 Dec 2003 22:15:33 -0000 1.4
+++ util.c 18 Jan 2004 09:29:39 -0000 1.5
@@ -16,8 +16,8 @@
/* # include <glib/gmain.h> */
/* #endif */
-#include "util.h"
#include "Ecore_Config.h"
+#include "util.h"
#define CHUNKLEN 4096
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs