Răsfoiți Sursa

Cleaning Up Some Warnings

Roger Hughston 20 ani în urmă
părinte
comite
2b32bad34f
2 a modificat fișierele cu 7 adăugiri și 3 ștergeri
  1. 6 2
      panda/src/express/config_express.cxx
  2. 1 1
      panda/src/express/datagram.cxx

+ 6 - 2
panda/src/express/config_express.cxx

@@ -185,14 +185,18 @@ init_libexpress() {
 
 
   init_system_type_handles();
   init_system_type_handles();
 
 
-  PandaSystem *ps = PandaSystem::get_global_ptr();
-
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
+ {
+  PandaSystem *ps = PandaSystem::get_global_ptr();
   ps->add_system("zlib");
   ps->add_system("zlib");
+ }
 #endif
 #endif
 
 
 #ifdef HAVE_THREADS
 #ifdef HAVE_THREADS
+ {
+  PandaSystem *ps = PandaSystem::get_global_ptr();
   ps->add_system("threads");
   ps->add_system("threads");
+  }
 #endif
 #endif
 }
 }
 
 

+ 1 - 1
panda/src/express/datagram.cxx

@@ -58,7 +58,7 @@ dump_hex(ostream &out) const {
   size_t num_bytes = get_length();
   size_t num_bytes = get_length();
   for (size_t line = 0; line < num_bytes; line += 16) {
   for (size_t line = 0; line < num_bytes; line += 16) {
     char hex[12];
     char hex[12];
-    sprintf(hex, "%04x ", line);
+    sprintf(hex, "%04x ", ((unsigned int )line));
     out << hex;
     out << hex;
 
 
     size_t p;
     size_t p;