summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9890a9a)
Include all nessecary headers, use the correct format strings and don't
redefine _GNU_SOURCE.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
#include <string.h>
#include <errno.h>
#include <getopt.h>
#include <string.h>
#include <errno.h>
#include <getopt.h>
for (j=0; j < nfiles; j += stride) {
if (ret[i].bs_ino == inodelist[j]) {
/* oops ... */
for (j=0; j < nfiles; j += stride) {
if (ret[i].bs_ino == inodelist[j]) {
/* oops ... */
- printf("failed. Unlinked inode %ld returned by bulkstat\n", inodelist[j]);
+ printf("failed. Unlinked inode %llu returned by bulkstat\n", (unsigned long long)inodelist[j]);
if ((ret[i].bs_ino == inodelist[j]) &&
(ret[i].bs_gen == genlist[j])) {
/* oops, the same inode with old gen number */
if ((ret[i].bs_ino == inodelist[j]) &&
(ret[i].bs_gen == genlist[j])) {
/* oops, the same inode with old gen number */
- printf("Unlinked inode %ld with generation %d "
+ printf("Unlinked inode %llu with generation %d "
"returned by bulkstat\n",
"returned by bulkstat\n",
- inodelist[j], genlist[j]);
+ (unsigned long long)inodelist[j],
+ genlist[j]);
exit(1);
}
if ((ret[i].bs_ino == inodelist[j])) {
exit(1);
}
if ((ret[i].bs_ino == inodelist[j])) {
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
int c;
struct sockaddr_in myAddr;
struct linger noLinger = {1, 0};
int c;
struct sockaddr_in myAddr;
struct linger noLinger = {1, 0};
char *endnum;
int errflag = 0;
char *p;
char *endnum;
int errflag = 0;
char *p;
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
return 1;
}
if (verbose_opt) {
return 1;
}
if (verbose_opt) {
- printf("truncating back to %lu\n", NUMHOLES_TO_SIZE(num_holes));
+ printf("truncating back to %llu\n",
+ (unsigned long long)
+ NUMHOLES_TO_SIZE(num_holes));
curr_holes = 0;
}
if (curr_holes != 0 && verbose_opt) {
curr_holes = 0;
}
if (curr_holes != 0 && verbose_opt) {
- printf("creating %lu more holes\n", num_holes - curr_holes);
+ printf("creating %llu more holes\n",
+ (unsigned long long)num_holes - curr_holes);
}
/* create holes by seeking and writing */
}
/* create holes by seeking and writing */
}
if (verbose_opt && ((i+1) % status_num == 0)) {
}
if (verbose_opt && ((i+1) % status_num == 0)) {
- printf("seeked and wrote %lu times\n", i+1);
+ printf("seeked and wrote %llu times\n",
+ (unsigned long long)i + 1);
#include <errno.h>
#include <time.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
- err = posix_memalign(&buf, ALIGNMENT, BUFSIZE);
+ err = posix_memalign((void **)&buf, ALIGNMENT, BUFSIZE);
if (err < 0) perror("posix_memalign failed");
if (err < 0) perror("posix_memalign failed");
- err = posix_memalign(&goodbuf, ALIGNMENT, BUFSIZE);
+ err = posix_memalign((void **)&goodbuf, ALIGNMENT, BUFSIZE);
if (err < 0) perror("posix_memalign failed");
err = unlink(filename);
if (err < 0) perror("posix_memalign failed");
err = unlink(filename);