[Pvfs2-cvs] commit by vilayann in pvfs2-1/src/apps/admin:
pvfs2-stat.c
CVS commit program
cvs at parl.clemson.edu
Tue Aug 15 21:23:18 EDT 2006
Update of /projects/cvsroot/pvfs2-1/src/apps/admin
In directory parlweb1:/tmp/cvs-serv18673/src/apps/admin
Modified Files:
pvfs2-stat.c
Log Message:
Fixed a few of the gcc 4.1.x "dereferencing type-punned pointer will break strict-aliasing rules"
warnings
Index: pvfs2-stat.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/apps/admin/pvfs2-stat.c,v
diff -p -u -r1.6 -r1.7
--- pvfs2-stat.c 16 Jun 2006 21:01:11 -0000 1.6
+++ pvfs2-stat.c 16 Aug 2006 01:23:18 -0000 1.7
@@ -444,19 +444,22 @@ void print_stats(const PVFS_object_ref *
}
if(attr->mask & PVFS_ATTR_SYS_ATIME)
{
- sprintf(a_time, "%s", ctime((const time_t *)&(attr)->atime));
+ time_t a_tmp = attr->atime;
+ sprintf(a_time, "%s", ctime((const time_t *)&a_tmp));
a_time[strlen(a_time)-1] = 0;
fprintf(stdout, " atime : %llu (%s)\n", llu(attr->atime), a_time);
}
if(attr->mask & PVFS_ATTR_SYS_MTIME)
{
- sprintf(m_time, "%s", ctime((const time_t *)&(attr)->mtime));
+ time_t m_tmp = attr->mtime;
+ sprintf(m_time, "%s", ctime((const time_t *)&m_tmp));
m_time[strlen(m_time)-1] = 0;
fprintf(stdout, " mtime : %llu (%s)\n", llu(attr->mtime), m_time);
}
if(attr->mask & PVFS_ATTR_SYS_CTIME)
{
- sprintf(c_time, "%s", ctime((const time_t *)&(attr)->ctime));
+ time_t c_tmp = attr->ctime;
+ sprintf(c_time, "%s", ctime((const time_t *)&c_tmp));
c_time[strlen(c_time)-1] = 0;
fprintf(stdout, " ctime : %llu (%s)\n", llu(attr->ctime), c_time);
}
More information about the Pvfs2-cvs
mailing list