Merge pull request #668 from dnwillia-ansys/fix-gcc-warnings
Remove gcc warnings when using -Wconversion in SWIG_UnpackData.
This commit is contained in:
commit
06657a9814
1 changed files with 4 additions and 4 deletions
|
|
@ -495,16 +495,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
char d = *(c++);
|
||||
unsigned char uu;
|
||||
if ((d >= '0') && (d <= '9'))
|
||||
uu = ((d - '0') << 4);
|
||||
uu = (unsigned char)((d - '0') << 4);
|
||||
else if ((d >= 'a') && (d <= 'f'))
|
||||
uu = ((d - ('a'-10)) << 4);
|
||||
uu = (unsigned char)((d - ('a'-10)) << 4);
|
||||
else
|
||||
return (char *) 0;
|
||||
d = *(c++);
|
||||
if ((d >= '0') && (d <= '9'))
|
||||
uu |= (d - '0');
|
||||
uu |= (unsigned char)(d - '0');
|
||||
else if ((d >= 'a') && (d <= 'f'))
|
||||
uu |= (d - ('a'-10));
|
||||
uu |= (unsigned char)(d - ('a'-10));
|
||||
else
|
||||
return (char *) 0;
|
||||
*u = uu;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue