178178#define SET_FILE_PERMISSIONS 1
179179
180180#ifdef _WIN32
181+ #undef SET_FILE_PERMISSIONS
181182#define SET_FILE_PERMISSIONS 0
182183#endif
183184
@@ -598,7 +599,7 @@ STATIC void on_change_timer(CALLBACK *pcallback)
598599STATIC void on_change_save (struct event_handler_args event )
599600{
600601 struct chlist * plist ;
601- if (save_restoreDebug >= 10 ) { logMsg ("on_change_save: event.usr=0x%lx \n" , (unsigned long )event .usr ); }
602+ if (save_restoreDebug >= 10 ) { logMsg ("on_change_save: event.usr=0x%llx \n" , (unsigned long long )event .usr ); }
602603 plist = (struct chlist * )event .usr ;
603604
604605 if (plist ) {
@@ -2362,7 +2363,7 @@ STATIC int create_data_set(char *filename, /* save set request file
23622363 while ((plist -> save_file [inx ] != 0 ) && (plist -> save_file [inx ] != '.' ) && (inx < (FN_LEN - 6 ))) inx ++ ;
23632364#else
23642365 /* fix bfr 2007-10-01: need to search for last '.', not first */
2365- inx = strlen (plist -> save_file ) - 1 ;
2366+ inx = ( int ) strlen (plist -> save_file ) - 1 ;
23662367 while (inx > 0 && plist -> save_file [inx ] != '.' ) inx -- ;
23672368#endif
23682369 plist -> save_file [inx ] = 0 ; /* truncate if necessary to leave room for ".sav" + null */
@@ -2502,8 +2503,8 @@ int set_requestfile_path(char *path, char *pathsub)
25022503 char fullpath [MAX_PATH_LEN + 1 ] = "" ;
25032504 int path_len = 0 , pathsub_len = 0 ;
25042505
2505- if (path && * path ) path_len = strlen (path );
2506- if (pathsub && * pathsub ) pathsub_len = strlen (pathsub );
2506+ if (path && * path ) path_len = ( int ) strlen (path );
2507+ if (pathsub && * pathsub ) pathsub_len = ( int ) strlen (pathsub );
25072508 if (path_len + pathsub_len > (MAX_PATH_LEN - 1 )) { /* may have to add '/' */
25082509 printf ("save_restore:set_requestfile_path: 'path'+'pathsub' is too long\n" );
25092510 return (ERROR );
@@ -3294,7 +3295,7 @@ STATIC int do_manual_restore(char *filename, int file_type, char *macrostring)
32943295 if (bp [strlen (bp ) - 1 ] != '\n' ) {
32953296 /* No, we didn't. One more read will certainly accumulate a value string of length BUF_SIZE */
32963297 bp = fgets (buffer , BUF_SIZE , inp_fd );
3297- n = BUF_SIZE - strlen (value_string ) - 1 ;
3298+ n = BUF_SIZE - ( int ) strlen (value_string ) - 1 ;
32983299 strncat (value_string , bp , n );
32993300 if (value_string [strlen (value_string ) - 1 ] == '\n' )
33003301 value_string [strlen (value_string ) - 1 ] = '\0' ;
@@ -3308,7 +3309,7 @@ STATIC int do_manual_restore(char *filename, int file_type, char *macrostring)
33083309 } else if (ca_pend_io (0.5 ) != ECA_NORMAL ) {
33093310 num_errs ++ ;
33103311 /* Don't forget trailing null character: "strlen(value_string)+1" below */
3311- } else if (ca_array_put (DBR_CHAR , strlen (value_string ) + 1 , chanid , value_string ) != ECA_NORMAL ) {
3312+ } else if (ca_array_put (DBR_CHAR , ( unsigned long ) strlen (value_string ) + 1 , chanid , value_string ) != ECA_NORMAL ) {
33123313 printf ("save_restore:do_manual_restore: ca_array_put of '%s' to '%s' failed\n" , value_string ,
33133314 PVname );
33143315 num_errs ++ ;
0 commit comments