File sblim-cmpi-nfsv4-1.0.11_syntax.patch of Package sblim-cmpi-nfsv4

Index: util/parser/lexer.l
===================================================================
--- util/parser/lexer.l.orig
+++ util/parser/lexer.l
@@ -4,6 +4,7 @@
 	/* Everything between %{ ... %} is copied verbatim to the start of the lex generated C code. */
 
 %{
+#include <string.h>
 #include "cmpidt.h"
 #include "parser.h"
 #ifndef YY_FLEX_LEX_COMPAT
@@ -111,7 +112,7 @@
 	/* USER SUBROUTINE SECTION */
 	/* Everything below is copied verbatim to the end of the lex generated C code. */
 
-yyerror(char *errmsg)
+void yyerror(char *errmsg)
 {
    fprintf(stderr, "NFSv4 parser, line %d: %s at '%s'\n", yylineno, errmsg, yytext);
 }
Index: util/parser/parser.y
===================================================================
--- util/parser/parser.y.orig
+++ util/parser/parser.y
@@ -16,13 +16,13 @@
 
 /* DEFINE ANY GLOBAL VARS HERE */
 static char * secname;				/* String to construct security property name */
-static int true = 1;				
+static int true = 1;
 
-static startinstance (char * classname);
-static endinstance();
-static startproperty (char * name, CMPIType type);
-static endproperty();
-static setvalue (void * value);
+static void startinstance (char * classname);
+static void endinstance();
+static void startproperty (char * name, CMPIType type);
+static void endproperty();
+static void setvalue (void * value);
 
 %}
 
@@ -136,19 +136,19 @@
 
 /* XML CIM output subroutines */
 
-static startinstance (char * classname)
+static void startinstance (char * classname)
 /* Start an XML CIM instance specification */
 {
    fprintf(NFSv4yyout, "<INSTANCE CLASSNAME=\"%s\">\n", classname);
 }
 
-static endinstance()
+static void endinstance()
 /* End XML CIM instance */
 {
    fprintf(NFSv4yyout, "</INSTANCE>\n");
 }
 
-static startproperty (char * name, CMPIType type)
+static void startproperty (char * name, CMPIType type)
 /* Start an XML CIM property specification */
 {
    fprintf(NFSv4yyout, " <PROPERTY NAME=\"%s\"", name);
@@ -175,13 +175,13 @@
    fprintf(NFSv4yyout, ">");
 }
 
-static endproperty()
+static void endproperty()
 /* End XML CIM property */
 {
    fprintf(NFSv4yyout, " </PROPERTY>\n");
 }
 
-static setvalue (void * value)
+static void setvalue (void * value)
 /* Set an XML CIM value */
 {
    fprintf(NFSv4yyout, " <VALUE>");
Index: util/xmlparser/xmllexer.l
===================================================================
--- util/xmlparser/xmllexer.l.orig
+++ util/xmlparser/xmllexer.l
@@ -4,6 +4,7 @@
 	/* Everything between %{ ... %} is copied verbatim to the start of the lex generated C code. */
 
 %{
+#include <string.h>
 #include "xmlparser.h"
 #ifndef YY_FLEX_LEX_COMPAT
 int yylineno = 1;
@@ -123,7 +124,7 @@
 	/* USER SUBROUTINE SECTION */
 	/* Everything below is copied verbatim to the end of the lex generated C code. */
 
-yyerror(char *errmsg)
+void yyerror(char *errmsg)
 {
    fprintf(stderr, "line %d: %s at '%s'\n", yylineno, errmsg, yytext);
 }
Index: util/xmlparser/setProperty.c
===================================================================
--- util/xmlparser/setProperty.c.orig
+++ util/xmlparser/setProperty.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 
 /* Stand-in for the real setProperty() to test the XML parser in isolation */ 
 int NFSv4setProperty( char * name, char * typename, char * valuebuffer)
openSUSE Build Service is sponsored by