]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: remove warnings from cm_daemon.c
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Oct 2010 23:28:26 +0000 (19:28 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 26 Oct 2010 01:13:20 +0000 (18:13 -0700)
Properly cast void * to long and int to LPVOID to avoid warnings.

Reviewed-on: http://gerrit.openafs.org/3019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit dd01970f440cc68fbd71a1544ee655131f42be51)
Change-Id: If6743a5b341f40f42955638d5e2f09b3cb24924f
Reviewed-on: http://gerrit.openafs.org/3118
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/afsd/cm_daemon.c

index 72ec25096295ccedcb6186531d1e9fd4dcfad34e..3c765cccd99e6dea3d8cd682387f647ad29414bc 100644 (file)
@@ -18,6 +18,7 @@
 #include <string.h>
 
 #include "afsd.h"
+#include "smb.h"
 
 #include <rx/rx.h>
 #include <rx/rx_prototypes.h>
@@ -88,9 +89,9 @@ void cm_BkgDaemon(void * parm)
     cm_bkgRequest_t *rp;
     afs_int32 code;
     char name[32] = "";
-    long daemonID = (long)parm;
+    long daemonID = (long)(LONG_PTR)parm;
 
-    snprintf(name, sizeof(name), "cm_BkgDaemon_ShutdownEvent%d", daemonID);
+    snprintf(name, sizeof(name), "cm_BkgDaemon_ShutdownEvent%u", daemonID);
 
     cm_BkgDaemon_ShutdownEvent[daemonID] = thrd_CreateEvent(NULL, FALSE, FALSE, name);
     if ( GetLastError() == ERROR_ALREADY_EXISTS )
@@ -673,7 +674,7 @@ void cm_InitDaemon(int nDaemons)
 
        for(i=0; i < cm_nDaemons; i++) {
             phandle = thrd_Create((SecurityAttrib) 0, 0,
-                                   (ThreadFunc) cm_BkgDaemon, (LPVOID)i, 0, &pid,
+                                   (ThreadFunc) cm_BkgDaemon, (LPVOID)(LONG_PTR)i, 0, &pid,
                                    "cm_BkgDaemon");
             osi_assertx(phandle != NULL, "cm_BkgDaemon thread creation failure");
             thrd_CloseHandle(phandle);