Explorar el Código

Fix variable "used uninitialized" warnings

- Gave a default address of localhost. Not sure if that's
  desirable but I figured if we're going to pretend nothing
  went wrong we might as well give it a valid address.
Nur Monson hace 12 años
padre
commit
c573948cf6
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      Core/Contents/Source/PolySocket.cpp

+ 4 - 1
Core/Contents/Source/PolySocket.cpp

@@ -53,7 +53,10 @@ void Address::setAddress(unsigned int ip, unsigned int port) {
 }
 }
 
 
 void Address::setAddress(String ipAsString, unsigned int port) {
 void Address::setAddress(String ipAsString, unsigned int port) {
-	unsigned int a,b,c,d;
+	unsigned int a = 127;
+	unsigned int b = 0;
+	unsigned int c = 0;
+	unsigned int d = 1;
 	
 	
 	vector<String> values = ipAsString.split(".");
 	vector<String> values = ipAsString.split(".");
 	if(values.size() == 4) {
 	if(values.size() == 4) {