Skip to content
Snippets Groups Projects
Commit 3d3bc28f authored by scjody's avatar scjody
Browse files

Branch b1_4

Cleanup compiler warnings on liblustre - patch by nic@cray.com

b=11175
r=adilger
r=green
r=scjody
parent c2f11f94
No related branches found
No related tags found
No related merge requests found
......@@ -309,7 +309,15 @@ extern int lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
# define LP_POISON ((void *)(long)0x5a5a5a5a)
#endif
#if (defined(__x86_64__) && defined(__KERNEL__))
/* this is a bit chunky */
#if defined(__KERNEL__)
#define _LWORDSIZE BITS_PER_LONG
#else
#define _LWORDSIZE __WORDSIZE
#endif
#if (defined(__x86_64__) && (defined(__KERNEL__) || defined(CRAY_XT3)))
/* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
# define LPU64 "%Lu"
# define LPD64 "%Ld"
......@@ -317,14 +325,14 @@ extern int lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
# define LPF64 "L"
# define LPSZ "%lu"
# define LPSSZ "%ld"
#elif (BITS_PER_LONG == 32 || __WORDSIZE == 32)
#elif (_LWORDSIZE == 32)
# define LPU64 "%Lu"
# define LPD64 "%Ld"
# define LPX64 "%#Lx"
# define LPF64 "L"
# define LPSZ "%u"
# define LPSSZ "%d"
#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
#elif (_LWORDSIZE == 64)
# define LPU64 "%lu"
# define LPD64 "%ld"
# define LPX64 "%#lx"
......@@ -336,4 +344,6 @@ extern int lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
# error "No word size defined"
#endif
#undef _LWORDSIZE
#endif
......@@ -234,7 +234,7 @@ static inline time_t cfs_duration_sec(cfs_duration_t d)
static inline void cfs_duration_usec(cfs_duration_t d, struct timeval *s)
{
#if (BITS_PER_LONG == 32) && (HZ > 4096)
uint64_t t;
__u64 t;
s->tv_sec = d / HZ;
t = (d - (cfs_duration_t)s->tv_sec * HZ) * ONE_MILLION;
......@@ -248,7 +248,7 @@ static inline void cfs_duration_usec(cfs_duration_t d, struct timeval *s)
static inline void cfs_duration_nsec(cfs_duration_t d, struct timespec *s)
{
#if (BITS_PER_LONG == 32)
uint64_t t;
__u64 t;
s->tv_sec = d / HZ;
t = (d - s->tv_sec * HZ) * ONE_BILLION;
......
......@@ -78,7 +78,7 @@ do_stat (int fd)
}
buffer[n] = 0;
n = sscanf (buffer, "%u %u %u %u %u %u %u %Lu %Lu %Lu %Lu",
n = sscanf (buffer, "%lu %lu %lu %lu %lu %lu %lu %Lu %Lu %Lu %Lu",
&new_counter.msgs_alloc, &new_counter.msgs_max,
&new_counter.errors,
&new_counter.send_count, &new_counter.recv_count,
......
#!/bin/sh
#!/bin/bash
LC_COLLATE="C"
progname="${0##*/}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment