diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-11-21 20:26:23 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-11-21 20:26:23 +0000 |
commit | 8fbf5fda24392d2a2ee19d6f40699a5de29da662 (patch) | |
tree | ac79c447bc4897d8cc350068504f184fdb8e4cfa /src/serializertext.cpp | |
parent | 2bb05378f31311c353d43688fa753822ab9a6461 (diff) | |
download | libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.gz libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.bz2 libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.xz libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.zip |
Everything in libbu++ now passes -Wall, this should have been done a long time
ago.
Diffstat (limited to 'src/serializertext.cpp')
-rw-r--r-- | src/serializertext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/serializertext.cpp b/src/serializertext.cpp index 2933e86..f758bf8 100644 --- a/src/serializertext.cpp +++ b/src/serializertext.cpp | |||
@@ -64,7 +64,7 @@ Serializer &SerializerText::operator<<(int16_t p) | |||
64 | } | 64 | } |
65 | Serializer &SerializerText::operator<<(int32_t p) | 65 | Serializer &SerializerText::operator<<(int32_t p) |
66 | { | 66 | { |
67 | fprintf(fhFile, "%ld\n", p); | 67 | fprintf(fhFile, "%d\n", p); |
68 | return *this; | 68 | return *this; |
69 | } | 69 | } |
70 | Serializer &SerializerText::operator<<(int64_t p) | 70 | Serializer &SerializerText::operator<<(int64_t p) |
@@ -84,7 +84,7 @@ Serializer &SerializerText::operator<<(uint16_t p) | |||
84 | } | 84 | } |
85 | Serializer &SerializerText::operator<<(uint32_t p) | 85 | Serializer &SerializerText::operator<<(uint32_t p) |
86 | { | 86 | { |
87 | fprintf(fhFile, "%lu\n", p); | 87 | fprintf(fhFile, "%u\n", p); |
88 | return *this; | 88 | return *this; |
89 | } | 89 | } |
90 | Serializer &SerializerText::operator<<(uint64_t p) | 90 | Serializer &SerializerText::operator<<(uint64_t p) |
@@ -110,7 +110,7 @@ Serializer &SerializerText::operator<<(long double p) | |||
110 | 110 | ||
111 | Serializer &SerializerText::operator>>(bool &p) | 111 | Serializer &SerializerText::operator>>(bool &p) |
112 | { | 112 | { |
113 | fscanf(fhFile, "%hhd\n", &p); | 113 | fscanf(fhFile, "%hhd\n", ((signed char *)&p)); |
114 | return *this; | 114 | return *this; |
115 | } | 115 | } |
116 | Serializer &SerializerText::operator>>(int8_t &p) | 116 | Serializer &SerializerText::operator>>(int8_t &p) |
@@ -125,7 +125,7 @@ Serializer &SerializerText::operator>>(int16_t &p) | |||
125 | } | 125 | } |
126 | Serializer &SerializerText::operator>>(int32_t &p) | 126 | Serializer &SerializerText::operator>>(int32_t &p) |
127 | { | 127 | { |
128 | fscanf(fhFile, "%ld\n", &p); | 128 | fscanf(fhFile, "%d\n", &p); |
129 | return *this; | 129 | return *this; |
130 | } | 130 | } |
131 | Serializer &SerializerText::operator>>(int64_t &p) | 131 | Serializer &SerializerText::operator>>(int64_t &p) |
@@ -145,7 +145,7 @@ Serializer &SerializerText::operator>>(uint16_t &p) | |||
145 | } | 145 | } |
146 | Serializer &SerializerText::operator>>(uint32_t &p) | 146 | Serializer &SerializerText::operator>>(uint32_t &p) |
147 | { | 147 | { |
148 | fscanf(fhFile, "%lu\n", &p); | 148 | fscanf(fhFile, "%u\n", &p); |
149 | return *this; | 149 | return *this; |
150 | } | 150 | } |
151 | Serializer &SerializerText::operator>>(uint64_t &p) | 151 | Serializer &SerializerText::operator>>(uint64_t &p) |
@@ -160,7 +160,7 @@ Serializer &SerializerText::operator>>(float &p) | |||
160 | } | 160 | } |
161 | Serializer &SerializerText::operator>>(double &p) | 161 | Serializer &SerializerText::operator>>(double &p) |
162 | { | 162 | { |
163 | fscanf(fhFile, "%f\n", &p); | 163 | fscanf(fhFile, "%lf\n", &p); |
164 | return *this; | 164 | return *this; |
165 | } | 165 | } |
166 | Serializer &SerializerText::operator>>(long double &p) | 166 | Serializer &SerializerText::operator>>(long double &p) |