瀏覽代碼

Cleaning Up Some Warnings

Roger Hughston 20 年之前
父節點
當前提交
2b32bad34f
共有 2 個文件被更改,包括 7 次插入3 次删除
  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();
 
-  PandaSystem *ps = PandaSystem::get_global_ptr();
-
 #ifdef HAVE_ZLIB
+ {
+  PandaSystem *ps = PandaSystem::get_global_ptr();
   ps->add_system("zlib");
+ }
 #endif
 
 #ifdef HAVE_THREADS
+ {
+  PandaSystem *ps = PandaSystem::get_global_ptr();
   ps->add_system("threads");
+  }
 #endif
 }
 

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

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