diff --git a/xsdconvert/GeneralFunctions.cc b/xsdconvert/GeneralFunctions.cc
index 4d1b7215988f80ba9bcc32c02d2266a3729d8418..b4c595a91dc979973da81f9f0a657671164124c3 100644
--- a/xsdconvert/GeneralFunctions.cc
+++ b/xsdconvert/GeneralFunctions.cc
@@ -616,8 +616,8 @@ void printWarning(const Mstring& filename, const Mstring& typeName, const Mstrin
     text.c_str());
 }
 
-void indent(FILE* file, const int x) {
-  for (int l = 0; l < x; ++l) {
+void indent(FILE* file, const unsigned int x) {
+  for (unsigned int l = 0; l < x; ++l) {
     fprintf(file, "\t");
   }
 }
diff --git a/xsdconvert/GeneralFunctions.hh b/xsdconvert/GeneralFunctions.hh
index eb893d8522a4780c8f64874738c5c3033f713ea4..fe2ab579e7bfa04d0b10a610eb863c61bfbfed1b 100644
--- a/xsdconvert/GeneralFunctions.hh
+++ b/xsdconvert/GeneralFunctions.hh
@@ -48,7 +48,7 @@ void printWarning(const Mstring& filename, int lineNumber, const Mstring& text);
 void printWarning(const Mstring& filename, const Mstring& typeName, const Mstring& text);
 void printError(const Mstring& filename, int lineNumber, const Mstring& text);
 void printError(const Mstring& filename, const Mstring& typeName, const Mstring& text);
-void indent(FILE * file, const int x);
+void indent(FILE * file, const unsigned int x);
 
 long double stringToLongDouble(const char * input);
 
diff --git a/xsdconvert/RootType.cc b/xsdconvert/RootType.cc
index efad1b93599b84939d81816a67ce606241014856..1bae4a0961a16d6ca906f729b2f83cfd8700167d 100644
--- a/xsdconvert/RootType.cc
+++ b/xsdconvert/RootType.cc
@@ -203,7 +203,7 @@ void RootType::addComment(const Mstring& text) {
   comment.push_back(Mstring("/* " + text + " */\n"));
 }
 
-void RootType::printComment(FILE * file, int level) {
+void RootType::printComment(FILE * file, unsigned int level) {
   if (!c_flag_used && !comment.empty()) {
     for (List<Mstring>::iterator c = comment.begin(); c; c = c->Next) {
       indent(file, level);
diff --git a/xsdconvert/RootType.hh b/xsdconvert/RootType.hh
index 9383a5368cf8d79950fd6b7e6a0cb13c72e4df4c..1469e4e72b2e1543140cd8a190f4d97cddc184ba 100644
--- a/xsdconvert/RootType.hh
+++ b/xsdconvert/RootType.hh
@@ -289,7 +289,7 @@ public:
   virtual void printVariant(FILE * file);
 
   virtual void addComment(const Mstring& text);
-  virtual void printComment(FILE * file, int level = 0);
+  virtual void printComment(FILE * file, unsigned int level = 0);
 
   void printMinOccursMaxOccurs(FILE * file, const bool inside_union,
       const bool empty_allowed = true) const;