diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-07-15 01:04:14 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-07-15 01:04:14 +0200 |
| commit | f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4 (patch) | |
| tree | 41a1a50970c7875038e25b6a0a632e23b1ce6001 /src/util | |
| parent | Fix blind-{cross,dot,quaternion}-product and blind-vector-projection (diff) | |
| download | blind-f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4.tar.gz blind-f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4.tar.bz2 blind-f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4.tar.xz | |
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/io.h | 12 | ||||
| -rw-r--r-- | src/util/to.h | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/util/io.h b/src/util/io.h index 2548a3c..b535255 100644 --- a/src/util/io.h +++ b/src/util/io.h @@ -20,10 +20,10 @@ #define ewritezeroes(...) enwritezeroes(1, __VA_ARGS__) #define egetfile(...) engetfile(1, __VA_ARGS__) -int writeall(int fd, void *buf, size_t n); +int writeall(int fd, const void *buf, size_t n); static inline void -enwriteall(int status, int fd, void *buf, size_t n, const char *fname) +enwriteall(int status, int fd, const void *buf, size_t n, const char *fname) { if (writeall(fd, buf, n)) enprintf(status, "write %s:", fname); @@ -40,19 +40,19 @@ enreadall(int status, int fd, void *buf, size_t n, const char *fname) return (size_t)r; } -int pwriteall(int fd, void *buf, size_t n, off_t ptr); +int pwriteall(int fd, const void *buf, size_t n, off_t ptr); static inline void -enpwriteall(int status, int fd, void *buf, size_t n, off_t ptr, const char *fname) +enpwriteall(int status, int fd, const void *buf, size_t n, off_t ptr, const char *fname) { if (pwriteall(fd, buf, n, ptr)) enprintf(status, "pwrite %s:", fname); } -int writezeroes(int fd, void *buf, size_t bufsize, size_t n); +int writezeroes(int fd, const void *buf, size_t bufsize, size_t n); static inline void -enwritezeroes(int status, int fd, void *buf, size_t bufsize, size_t n, const char *fname) +enwritezeroes(int status, int fd, const void *buf, size_t bufsize, size_t n, const char *fname) { if (writezeroes(fd, buf, bufsize, n)) enprintf(status, "write %s:", fname); diff --git a/src/util/to.h b/src/util/to.h index c927d57..86686ea 100644 --- a/src/util/to.h +++ b/src/util/to.h @@ -25,7 +25,7 @@ DEF_STR_TO_INT(toi, int, tolli, long long int, "i") #define toji tolli #define DEF_STR_TO_INT(FNAME, TYPE, PRI)\ - static inline TYPE\ + static TYPE\ en##FNAME##_flag(int status, int flag, const char *s, TYPE min, TYPE max)\ {\ TYPE ret = 0;\ @@ -42,7 +42,7 @@ DEF_STR_TO_INT(toi, int, tolli, long long int, "i") return en##FNAME##_flag(1, flag, s, min, max);\ }\ \ - static inline TYPE\ + static TYPE\ en##FNAME##_arg(int status, const char *name, const char *s, TYPE min, TYPE max)\ {\ TYPE ret = 0;\ @@ -100,7 +100,7 @@ DEF_STR_TO_INT(toi, int, "i") return 0;\ }\ \ - static inline TYPE\ + static TYPE\ en##FNAME##_flag(int status, int flag, const char *s)\ {\ TYPE ret = 0;\ @@ -115,7 +115,7 @@ DEF_STR_TO_INT(toi, int, "i") return en##FNAME##_flag(1, flag, s);\ }\ \ - static inline TYPE\ + static TYPE\ en##FNAME##_arg(int status, const char *name, const char *s)\ {\ TYPE ret = 0;\ |
