Skip to content
Snippets Groups Projects
Commit fa496c5b authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

WRG: fix cast-align warning

parent a006e158
No related branches found
No related tags found
No related merge requests found
...@@ -705,12 +705,13 @@ float MSTARImageIO::byteswap_SR_IR(unsigned char *pointer) ...@@ -705,12 +705,13 @@ float MSTARImageIO::byteswap_SR_IR(unsigned char *pointer)
{ {
float * temp; float * temp;
unsigned char iarray[4]; unsigned char iarray[4];
void *vptr;
iarray[0] = *(pointer + 3); iarray[0] = *(pointer + 3);
iarray[1] = *(pointer + 2); iarray[1] = *(pointer + 2);
iarray[2] = *(pointer + 1); iarray[2] = *(pointer + 1);
iarray[3] = *(pointer); iarray[3] = *(pointer);
temp = (float *) iarray ; vptr = static_cast<void*>(iarray);
temp = static_cast<float*>(vptr);
return *(temp); return *(temp);
} }
...@@ -718,10 +719,11 @@ unsigned short MSTARImageIO::byteswap_SUS_IUS(unsigned char *pointer) ...@@ -718,10 +719,11 @@ unsigned short MSTARImageIO::byteswap_SUS_IUS(unsigned char *pointer)
{ {
unsigned short *temp; unsigned short *temp;
unsigned char iarray[2]; unsigned char iarray[2];
void *vptr;
iarray[0] = *(pointer + 1); iarray[0] = *(pointer + 1);
iarray[1] = *(pointer); iarray[1] = *(pointer);
temp = (unsigned short *) iarray; vptr = static_cast<void*>(iarray);
temp = static_cast<unsigned short*>(vptr);
return *(temp); return *(temp);
} }
......
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