From: Dave H. <hel...@us...> - 2014-02-19 23:48:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcb - Small Footprint CIM Broker". The branch, master has been updated via c29c15e5d73d70bf547c71167f9816e54897718a (commit) from 5ffd5df6a61d3553718580004d130aae7deb9799 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c29c15e5d73d70bf547c71167f9816e54897718a Author: Dave Heller <hel...@us...> Date: Wed Feb 19 18:47:31 2014 -0500 [sfcb-tix:#100] Fix some compiler warnings & errors on newer distros ----------------------------------------------------------------------- Summary of changes: cimXmlOps.y | 7 ++++--- cimXmlParser.c | 6 +++++- indCIMXMLHandler.c | 6 +++--- objectImpl.c | 4 ++-- queryLexer.l | 2 +- sfcBroker.c | 2 +- sfcbproc.c | 2 +- sfcbtrace.c | 2 +- test/TestProviders/tests/Makefile.am | 2 +- 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cimXmlOps.y b/cimXmlOps.y index fd62e4d..41b4e93 100644 --- a/cimXmlOps.y +++ b/cimXmlOps.y @@ -72,7 +72,7 @@ extern int noChunking; -extern int yyerror(const char*); +extern int yyerror(void* parm, const char*); extern int yylex (void *lvalp, ParserControl *parm); //extern MsgSegment setInstanceMsgSegment(const CMPIInstance *ci); @@ -1797,6 +1797,7 @@ buildEnumerationCountRequest(void *parm) %} %pure_parser +%parse-param { void* parm } /* **============================================================================== @@ -3300,7 +3301,7 @@ modifyInstance $$.properties=0; setRequest(parm,&$$,sizeof(XtokModifyInstance),OPS_ModifyInstance); - if (buildModifyInstanceRequest(parm)) yyerror("Invalid Parameter"); + if (buildModifyInstanceRequest(parm)) yyerror(parm, "Invalid Parameter"); } | localNameSpacePath modifyInstanceParmsList { @@ -3314,7 +3315,7 @@ modifyInstance $$.properties=$2.properties; setRequest(parm,&$$,sizeof(XtokModifyInstance),OPS_ModifyInstance); - if (buildModifyInstanceRequest(parm)) yyerror("Invalid Parameter"); + if (buildModifyInstanceRequest(parm)) yyerror(parm, "Invalid Parameter"); } ; diff --git a/cimXmlParser.c b/cimXmlParser.c index 7614c05..0f8f51d 100644 --- a/cimXmlParser.c +++ b/cimXmlParser.c @@ -1696,8 +1696,12 @@ yylex(YYSTYPE * lvalp, ParserControl * parm) _SFCB_RETURN(0); } +/* + * The bison %parse-param directive modifies the yyerror() signature as well as + * yyparse(), so we must handle the extra parm even though we don't use it. + */ int -yyerror(char *s) +yyerror(void __attribute__ ((unused)) *parm, char *s) { printf("*-* yyerror: %s\n", s); return 5; diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index be7be71..eb566a2 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -737,8 +737,8 @@ retryExport(void *lctx) struct timezone tz; int rint, maxcount, - ract, - rtint; + ract; + CMPIUint32 rtint; CMPIUint64 sfc = 0; CMPIObjectPath *op; CMPIEnumeration *isenm = NULL; @@ -834,7 +834,7 @@ retryExport(void *lctx) CMSetProperty(sub, "DeliveryFailureTime", &sfc, CMPI_uint64); CBModifyInstance(_broker, ctxLocal, cur->sub, sub, NULL); cur = cur->next; - } else if (sfc + rtint < tv.tv_sec) { + } else if (sfc + rtint < (CMPIUint64) tv.tv_sec) { // Exceeded subscription removal threshold, if action is: // 2, delete the sub; 3, disable the sub; otherwise, nothing if (ract == 2) { diff --git a/objectImpl.c b/objectImpl.c index 8df8087..e9c889c 100644 --- a/objectImpl.c +++ b/objectImpl.c @@ -3064,7 +3064,7 @@ oi_test() printf("Failed isInstance check, rc=%d\n",i); fail = 1; } - i=isInstance(cop); + i=isInstance((CMPIInstance *)cop); if (i) { printf("Failed negative isInstance check, rc=%d\n",i); fail = 1; @@ -3178,7 +3178,7 @@ oi_test() printf("Failed to create ClClass.\n"); fail = 1; } - unsigned char cch=ClClassAddGrandParent(clc, "myGClass"); + //unsigned char cch=ClClassAddGrandParent(clc, "myGClass"); // not sure of the failure case here i=ClClassAddProperty(clc,"tprop" ,d,"testref"); diff --git a/queryLexer.l b/queryLexer.l index ce9afe7..49932d0 100644 --- a/queryLexer.l +++ b/queryLexer.l @@ -52,7 +52,7 @@ /////////////////////////////////////////////////////////////////////////////// -extern int queryInput(char* buffer, int* numRead, int numRequested); +extern int queryInput(char* buffer, void* numRead, int numRequested); extern int yyErr(const char*); extern char * yyStrcpy(char *txt, int len); diff --git a/sfcBroker.c b/sfcBroker.c index a71dc32..67b1f9e 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -807,7 +807,7 @@ main(int argc, char *argv[]) /* Create a pad argument of appropriate length */ char *padArg = malloc(labelProcs + 1); - for (i=0; i < labelProcs; i++) + for (i=0; i < (int)labelProcs; i++) padArg[i] = 'X'; padArg[i] = '\0'; diff --git a/sfcbproc.c b/sfcbproc.c index dfcde72..ed4d76a 100644 --- a/sfcbproc.c +++ b/sfcbproc.c @@ -522,7 +522,7 @@ static void usage(int status) { int i; fprintf(stdout, "Usage: %s [options]\n", name); - for (i=0; i < sizeof(help) / sizeof(char*); i++) + for (i=0; i < (int) (sizeof(help) / sizeof(char*)); i++) fprintf(stdout, "%s\n", help[i]); } exit(status); diff --git a/sfcbtrace.c b/sfcbtrace.c index 83e28d9..09985f9 100644 --- a/sfcbtrace.c +++ b/sfcbtrace.c @@ -85,7 +85,7 @@ int main(int argc, char **argv) { vpDP = shmat( shmid, NULL, 0 ); if ( (vpDP == (void*)-1) || (vpDP == NULL) ) { /* shmat returns an error */ - printf( "shmat(%x,) returned %08X with errno = %s(%u) in %s at line %d\n", shmid, (unsigned int)vpDP, strerror(errno), errno, __FILE__, __LINE__ ); + printf( "shmat(%x,) returned %p with errno = %s(%u) in %s at line %d\n", shmid, vpDP, strerror(errno), errno, __FILE__, __LINE__ ); exit(4); } diff --git a/test/TestProviders/tests/Makefile.am b/test/TestProviders/tests/Makefile.am index 6510b62..2765a16 100644 --- a/test/TestProviders/tests/Makefile.am +++ b/test/TestProviders/tests/Makefile.am @@ -32,4 +32,4 @@ endif #Some wbemcat tests export SRCDIR=$(srcdir) -TESTS = $(srcdir)/xmltest.sh $(srcdir)/IndRetryTest.sh $(srcdir)/limitTest.sh +TESTS = xmltest.sh IndRetryTest.sh limitTest.sh hooks/post-receive -- sfcb - Small Footprint CIM Broker |