Warning fixes.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 1 Mar 2012 00:08:05 +0000 (00:08 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 1 Mar 2012 00:08:05 +0000 (00:08 +0000)
13 files changed:
org.glite.lb.common/Makefile
org.glite.lb.common/interface/xml_conversions.h
org.glite.lb.common/src/status.c.T
org.glite.lb.state-machine/src/intjobstat_supp.c
org.glite.lb.state-machine/src/lb_plugin.c
org.glite.lbjp-common.gsoap-plugin/Makefile
org.glite.lbjp-common.gsoap-plugin/examples/wscalc_srv_ex.c
org.glite.lbjp-common.gsoap-plugin/examples/wscalc_srv_ex2.c
org.glite.lbjp-common.gsoap-plugin/src/sizeof_soap.c
org.glite.lbjp-common.jp-interface/src/attr.c
org.glite.lbjp-common.server-bones/examples/cnt_example.c
org.glite.lbjp-common.server-bones/examples/srv_example.c
org.glite.lbjp-common.server-bones/src/srvbones.c

index 215d1cc..432c878 100644 (file)
@@ -53,7 +53,7 @@ EXPAT_LIBS?=${expatlib} -lexpat
 CLASSADS_CFLAGS?=-I${classads_prefix}/include -I${classads_prefix}/include/classad
 CLASSADS_LIBS?=${classadslib} -lclassad
 
-CFLAGS:=${CFLAGS} ${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
+CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
        -I. \
        -I${top_srcdir}/test \
        -I${stagedir}${prefix}/include \
@@ -62,7 +62,7 @@ CFLAGS:=${CFLAGS} ${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
        ${COVERAGE_FLAGS} \
        -D_GNU_SOURCE \
        -DDATAGRID_EXTENSION ${LB_STANDALONE_FLAGS} \
-       -DBUILDING_LB_COMMON 
+       -DBUILDING_LB_COMMON ${CFLAGS}
 
 LDFLAGS:=${LDFLAGS} -L${stagedir}${prefix}/${libdir} \
        ${COVERAGE_FLAGS}
index a4ae7dd..6f57c35 100644 (file)
@@ -153,6 +153,7 @@ uint16_t edg_wll_from_string_to_uint16_t(edg_wll_XML_ctx *XMLCtx);
 struct timeval edg_wll_from_string_to_timeval(edg_wll_XML_ctx *XMLCtx);
 time_t edg_wll_from_string_to_time_t(edg_wll_XML_ctx *XMLCtx);
 edg_wll_Source edg_wll_from_string_to_logsrc(edg_wll_XML_ctx *XMLCtx);
+void *edg_wll_from_string_to_cclassad(edg_wll_XML_ctx *XMLCtx);
 
 char *edg_wll_stat_flags_to_string(int flags);
 int edg_wll_string_to_stat_flags(char *cflags);
index 1c48795..b412633 100644 (file)
@@ -32,7 +32,7 @@ static const struct timeval null_timeval = {0,0};
                 gen qq{$sep $term};
         $sep = ", ";
         }
-        $sep = ", 0};";
+        $sep = "};";
         gen qq{$sep};
 @@@}
 
index c4bb463..a436180 100644 (file)
@@ -17,6 +17,7 @@ limitations under the License.
 */
 
 
+#define _GNU_SOURCE
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -470,6 +471,7 @@ static struct timeval dec_timeval(char *in, char **rest)
        
        t.tv_sec = dec_int(in, &tmp_in);
        if (tmp_in != NULL) t.tv_usec = dec_int(tmp_in, &tmp_in);
+       else t.tv_usec = 0;
        *rest = tmp_in;
        return t;
 }
index dbef5c1..69b9b35 100644 (file)
@@ -91,6 +91,9 @@ static int readline(
 );
 char* get_namespace(const char* attr);
 
+// XXX: backend_private.h into org.glite.lbjp-common.jp-interface?
+int glite_jppsbe_append_tags(void *fpctx, char *jobid, glite_jp_attrval_t *attr);
+
 static int lb_StringToAttr(const char *name) {
         unsigned int    i;
 
index fa7dd6c..4b8a036 100644 (file)
@@ -93,12 +93,12 @@ GSOAP_LIBS_lang:=${GSOAPXX_LIBS}
 endif
 
 
-CFLAGS:= ${CFLAGS} ${DEBUG} \
+CFLAGS:= ${DEBUG} \
        -DVERSION=\"${version}\" \
        -DWITH_NONAMESPACES \
        -I. -I${top_srcdir2}/interface \
        -I${stagedir}${prefix}/include \
-       ${COVERAGE_FLAGS} -D_GNU_SOURCE -DDATAGRID_EXTENSION
+       ${COVERAGE_FLAGS} -D_GNU_SOURCE -DDATAGRID_EXTENSION ${CFLAGS}
 
 LDFLAGS:=${LDFLAGS} ${COVERAGE_FLAGS}
 
index 975afa8..b0f9528 100644 (file)
@@ -48,7 +48,6 @@ main(int argc, char **argv)
        char                               *name;
        char                               *cert, *key;
        int                                             opt;
-       edg_wll_GssCred                     cred;
 
        cert = key = NULL;
        name = strrchr(argv[0],'/');
index 3bec28a..1a2819d 100644 (file)
@@ -52,7 +52,7 @@ main(int argc, char **argv)
        edg_wll_GssConnection           connection;
        glite_gsplugin_Context          ctx;
        struct sockaddr_storage         a;
-       int                             alen;
+       socklen_t                       alen;
        char                             *name, *msg;
        int                             opt,
                                        port = 19999;
index 457d106..61c08e5 100644 (file)
@@ -20,7 +20,7 @@ limitations under the License.
 int
 main(int argc, char **argv)
 {      
-       printf("%lu\n", sizeof(struct soap));
+       printf("%zd\n", sizeof(struct soap));
 
        return 0;
 }
index 3a9f33b..2fdc2b9 100644 (file)
@@ -116,7 +116,7 @@ static char * fb_to_db_full(void *ctx,const glite_jp_attrval_t *attr)
        if (attr->origin < 0 || attr->origin > GLITE_JP_ATTR_ORIG_FILE) {
                free(db); return NULL; 
        }
-       len = sprintf(db,"%c:%d:%c:",attr->binary ? 'B' : 'S',
+       len = sprintf(db,"%c:%ld:%c:",attr->binary ? 'B' : 'S',
                attr->timestamp,orig_char[attr->origin]);
 
        if (attr->origin_detail) len += escape_colon(attr->origin_detail,db+len);
index c6a4830..b814604 100644 (file)
@@ -149,7 +149,7 @@ int main(int argc, char **argv)
 
 int writen(int fd, char *ptr, int nbytes)
 {
-       int             nleft, nwritten;
+       int             nleft, nwritten = 0;
 
        nleft = nbytes;
        dprintf(("start writing %d bytes\n", nbytes));
index cd46278..131c91e 100644 (file)
@@ -151,7 +151,7 @@ int disconnect(int conn, struct timeval *to, void *cdata)
 
 int writen(int fd, char *ptr, int nbytes)
 {
-       int             nleft, nwritten;
+       int             nleft, nwritten = 0;
 
        nleft = nbytes;
        dprintf(("start writing %d bytes\n", nbytes));
index 0510cd7..7b4814a 100644 (file)
@@ -744,7 +744,7 @@ static int check_timeout(struct timeval timeout, struct timeval before, struct t
  */
 static int do_sendmsg(int to_sock, int sock, unsigned long clnt_dispatched, int srv)
 {
-       struct msghdr           msg = {0};
+       struct msghdr           msg;
        struct cmsghdr     *cmsg;
        struct iovec            sendiov;
        int                                     myfds,                                                  /* file descriptors to pass. */
@@ -756,6 +756,7 @@ static int do_sendmsg(int to_sock, int sock, unsigned long clnt_dispatched, int
        memset(sendbuf, 0, sizeof(sendbuf));
        snprintf(sendbuf, sizeof(sendbuf), "%u %lu", srv, clnt_dispatched);
 
+       memset(&msg, 0, sizeof(msg));
        msg.msg_name = NULL;
        msg.msg_namelen = 0;
        msg.msg_iov = &sendiov;
@@ -786,7 +787,7 @@ static int do_sendmsg(int to_sock, int sock, unsigned long clnt_dispatched, int
 /* receive socket sock through socket from_sock */
 static int do_recvmsg(int from_sock, int *sock, unsigned long *clnt_accepted,int *srv)
 {
-       struct msghdr           msg = {0};
+       struct msghdr           msg;
        struct cmsghdr     *cmsg;
        struct iovec            recviov;
        int                                     myfds;                                                  /* file descriptors to pass. */
@@ -794,6 +795,7 @@ static int do_recvmsg(int from_sock, int *sock, unsigned long *clnt_accepted,int
        char                            recvbuf[MSG_BUFSIZ];
 
 
+       memset(&msg, 0, sizeof(msg));
        msg.msg_name = NULL;
        msg.msg_namelen = 0;
        msg.msg_iov = &recviov;