File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ bool compilet::is_elf_file(const std::string &file_name)
328
328
{
329
329
char buf[4 ];
330
330
for (std::size_t i=0 ; i<4 ; i++)
331
- buf[i] = in.get ();
331
+ buf[i]= static_cast < char >( in.get () );
332
332
if (buf[0 ]==0x7f && buf[1 ]==' E' &&
333
333
buf[2 ]==' L' && buf[3 ]==' F' )
334
334
return true ;
Original file line number Diff line number Diff line change @@ -177,17 +177,17 @@ bool read_bin_goto_object(
177
177
178
178
{
179
179
char hdr[4 ];
180
- hdr[0 ]=in.get ();
181
- hdr[1 ]=in.get ();
182
- hdr[2 ]=in.get ();
180
+ hdr[0 ]=static_cast < char >( in.get () );
181
+ hdr[1 ]=static_cast < char >( in.get () );
182
+ hdr[2 ]=static_cast < char >( in.get () );
183
183
184
184
if (hdr[0 ]==' G' && hdr[1 ]==' B' && hdr[2 ]==' F' )
185
185
{
186
186
// OK!
187
187
}
188
188
else
189
189
{
190
- hdr[3 ]=in.get ();
190
+ hdr[3 ]=static_cast < char >( in.get () );
191
191
if (hdr[0 ]==0x7f && hdr[1 ]==' G' && hdr[2 ]==' B' && hdr[3 ]==' F' )
192
192
{
193
193
// OK!
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ std::size_t irep_serializationt::read_gb_word(std::istream &in)
193
193
194
194
while (in.good ())
195
195
{
196
- unsigned char ch=in.get ();
196
+ unsigned char ch=static_cast < unsigned char >( in.get () );
197
197
res|=(size_t (ch&0x7f ))<<shift_distance;
198
198
shift_distance+=7 ;
199
199
if ((ch&0x80 )==0 )
@@ -228,13 +228,13 @@ irep_idt irep_serializationt::read_gb_string(std::istream &in)
228
228
char c;
229
229
size_t length=0 ;
230
230
231
- while ((c = in.get ()) != 0 )
231
+ while ((c = static_cast < char >( in.get () )) != 0 )
232
232
{
233
233
if (length>=read_buffer.size ())
234
234
read_buffer.resize (read_buffer.size ()*2 , 0 );
235
235
236
236
if (c==' \\ ' ) // escaped chars
237
- read_buffer[length] = in.get ();
237
+ read_buffer[length] = static_cast < char >( in.get () );
238
238
else
239
239
read_buffer[length] = c;
240
240
You can’t perform that action at this time.
0 commit comments