diff --git a/xsdconvert/GeneralFunctions.cc b/xsdconvert/GeneralFunctions.cc
index b4c595a91dc979973da81f9f0a657671164124c3..e610c74edb41c5093e51cd04956b580d49399a89 100644
--- a/xsdconvert/GeneralFunctions.cc
+++ b/xsdconvert/GeneralFunctions.cc
@@ -136,7 +136,7 @@ void XSDName2TTCN3Name(const Mstring& in, QualifiedNames & used_names, modeType
 
     if (type_of_the_name == type_reference_name) {
       if (isBuiltInType(res)) {
-        res[0] = toupper(res[0]);
+        res[0] = (char)toupper(res[0]);
         res = "XSD." + res;
         return;
       }
diff --git a/xsdconvert/Mstring.cc b/xsdconvert/Mstring.cc
index 650928d22ad00b0a5ea5abdeb9402d7e783273c8..e839b7dc7b92cb7ebf37fcd145a67835cb256264 100644
--- a/xsdconvert/Mstring.cc
+++ b/xsdconvert/Mstring.cc
@@ -103,11 +103,11 @@ char * Mstring::foundAt(const char * s) {
 }
 
 void Mstring::setCapitalized() {
-  text[0] = toupper(text[0]);
+  text[0] = (char)toupper(text[0]);
 }
 
 void Mstring::setUncapitalized() {
-  text[0] = tolower(text[0]);
+  text[0] = (char)tolower(text[0]);
 }
 
 Mstring Mstring::getPrefix(const char delimiter) const {