Kaynağa Gözat

Add casts to normalise parameters passed to printf

mingodad 8 yıl önce
ebeveyn
işleme
8a69d45855
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      SquiLu/sqstdlib/sqstdrex.cpp

+ 2 - 2
SquiLu/sqstdlib/sqstdrex.cpp

@@ -606,9 +606,9 @@ SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error)
 			scprintf(_SC("\n"));
 			scprintf(_SC("\n"));
 			for(i = 0;i < nsize; i++) {
 			for(i = 0;i < nsize; i++) {
 				if(exp->_nodes[i].type>MAX_CHAR)
 				if(exp->_nodes[i].type>MAX_CHAR)
-					scprintf(_SC("[%02d] %10s "),i,g_nnames[exp->_nodes[i].type-MAX_CHAR]);
+					scprintf(_SC("[%02d] %10s "),(SQInt32)i,g_nnames[exp->_nodes[i].type-MAX_CHAR]);
 				else
 				else
-					scprintf(_SC("[%02d] %10c "),i,exp->_nodes[i].type);
+					scprintf(_SC("[%02d] %10c "),(SQInt32)i,exp->_nodes[i].type);
 				scprintf(_SC("left %02d right %02d next %02d\n"), (SQInt32)exp->_nodes[i].left, (SQInt32)exp->_nodes[i].right, (SQInt32)exp->_nodes[i].next);
 				scprintf(_SC("left %02d right %02d next %02d\n"), (SQInt32)exp->_nodes[i].left, (SQInt32)exp->_nodes[i].right, (SQInt32)exp->_nodes[i].next);
 			}
 			}
 			scprintf(_SC("\n"));
 			scprintf(_SC("\n"));