summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient/testutime.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-10-19 14:52:41 -0700
committerJeremy Allison <jra@samba.org>2011-10-20 02:29:52 +0200
commit019f643c693b4c6de3da78159d8c4507b924d93a (patch)
tree7c12b78713983167251b4fdf181bed538537c5b7 /examples/libsmbclient/testutime.c
parentf64f91f96f71271186b3e171d24f0d0137620cba (diff)
downloadsamba-019f643c693b4c6de3da78159d8c4507b924d93a.tar.gz
samba-019f643c693b4c6de3da78159d8c4507b924d93a.tar.xz
samba-019f643c693b4c6de3da78159d8c4507b924d93a.zip
Fix a boatload of warnings in the examples.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Oct 20 02:29:52 CEST 2011 on sn-devel-104
Diffstat (limited to 'examples/libsmbclient/testutime.c')
-rw-r--r--examples/libsmbclient/testutime.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/examples/libsmbclient/testutime.c b/examples/libsmbclient/testutime.c
index 8624ca108b..2b3c40b61b 100644
--- a/examples/libsmbclient/testutime.c
+++ b/examples/libsmbclient/testutime.c
@@ -9,15 +9,12 @@
int main(int argc, char * argv[])
{
- int ret;
int debug = 0;
- char buffer[16384];
- char mtime[32];
- char ctime[32];
- char atime[32];
- char * pSmbPath = NULL;
+ char m_time[32];
+ char c_time[32];
+ char a_time[32];
+ const char * pSmbPath = NULL;
time_t t = time(NULL);
- struct tm tm;
struct stat st;
struct utimbuf utimbuf;
@@ -51,9 +48,9 @@ int main(int argc, char * argv[])
}
printf("Before\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
- st.st_mtime, ctime_r(&st.st_mtime, mtime),
- st.st_ctime, ctime_r(&st.st_ctime, ctime),
- st.st_atime, ctime_r(&st.st_atime, atime));
+ st.st_mtime, ctime_r(&st.st_mtime, m_time),
+ st.st_ctime, ctime_r(&st.st_ctime, c_time),
+ st.st_atime, ctime_r(&st.st_atime, a_time));
utimbuf.actime = t; /* unchangable (wont change) */
utimbuf.modtime = t; /* this one should succeed */
@@ -70,9 +67,9 @@ int main(int argc, char * argv[])
}
printf("After\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
- st.st_mtime, ctime_r(&st.st_mtime, mtime),
- st.st_ctime, ctime_r(&st.st_ctime, ctime),
- st.st_atime, ctime_r(&st.st_atime, atime));
+ st.st_mtime, ctime_r(&st.st_mtime, m_time),
+ st.st_ctime, ctime_r(&st.st_ctime, c_time),
+ st.st_atime, ctime_r(&st.st_atime, a_time));
return 0;
}