-fix time assertion introduce in last patch
[oweals/gnunet.git] / src / util / w32cat.c
index 4f56ba58eb330370e68a0971a4f288c4882b87da..7e1d6cc4b440719b02f4bcad6f81210df0ebf671 100644 (file)
@@ -57,7 +57,7 @@ install_parent_control_handler ()
   if ((0 != errno) || (env_buf == env_buf_end))
     return;
   /* Gcc will issue a warning here. What to do with it? */
-  pipe_handle = (HANDLE) pipe_fd;
+  pipe_handle = (HANDLE) (uintptr_t) pipe_fd;
   CreateThread (NULL, 0, parent_control_thread, (LPVOID) pipe_handle, 0, NULL);
 }
 
@@ -84,7 +84,7 @@ main (int argc, char **argv)
   for (i = 1; i < argcw || argcw == 1; i++)
   {
     DWORD r, w;
-    int is_dash = wcscmp (argvw[i], L"-") == 0;
+    int is_dash = wcscmp (NULL == argvw[i] ? L"-" : argvw[i], L"-") == 0;
     if (argcw == 1 || is_dash)
     {
       stdi = GetStdHandle (STD_INPUT_HANDLE);