]> granicus.if.org Git - curl/commitdiff
smb: rename variable to fix shadowing warning
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sat, 8 Jul 2017 21:19:36 +0000 (23:19 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 9 Jul 2017 12:42:13 +0000 (14:42 +0200)
GCC 4.6.3 on travis complains:
smb.c: In function ‘get_posix_time’:
smb.c:725:13: error: declaration of ‘time’ shadows a global declaration
[-Werror=shadow]

Fix this by renaming the variable.

lib/smb.c

index 8ae4303b0936d320b0aa8081cd9c500045fb1ff3..13dfd514b4246ecb1a99bd9c2813aa37baa416ed 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -722,14 +722,14 @@ static CURLcode smb_connection_state(struct connectdata *conn, bool *done)
 static void get_posix_time(long *_out, const void *_in)
 {
 #ifdef HAVE_LONGLONG
-  long long time = *(long long *) _in;
+  long long timestamp = *(long long *) _in;
 #else
-  unsigned __int64 time = *(unsigned __int64 *) _in;
+  unsigned __int64 timestamp = *(unsigned __int64 *) _in;
 #endif
 
-  time -= 116444736000000000ULL;
-  time /= 10000000;
-  *_out = (long) time;
+  timestamp -= 116444736000000000ULL;
+  timestamp /= 10000000;
+  *_out = (long) timestamp;
 }
 
 static CURLcode smb_request_state(struct connectdata *conn, bool *done)