Commit 9c50ee37 authored by Michael Buesch's avatar Michael Buesch Committed by Stefan Behnel

TypeConversion: Fix pointer qualifier compiler warning

This fixes the following compiler warning:
  warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
parent 433e6992
...@@ -730,14 +730,14 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid ...@@ -730,14 +730,14 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid
digit_pos = abs((int)(remaining % (8*8))); digit_pos = abs((int)(remaining % (8*8)));
remaining = ({{TYPE}}) (remaining / (8*8)); remaining = ({{TYPE}}) (remaining / (8*8));
dpos -= 2; dpos -= 2;
*(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos]; /* copy 2 digits at a time */ *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos]; /* copy 2 digits at a time */
last_one_off = (digit_pos < 8); last_one_off = (digit_pos < 8);
break; break;
case 'd': case 'd':
digit_pos = abs((int)(remaining % (10*10))); digit_pos = abs((int)(remaining % (10*10)));
remaining = ({{TYPE}}) (remaining / (10*10)); remaining = ({{TYPE}}) (remaining / (10*10));
dpos -= 2; dpos -= 2;
*(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos]; /* copy 2 digits at a time */ *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos]; /* copy 2 digits at a time */
last_one_off = (digit_pos < 10); last_one_off = (digit_pos < 10);
break; break;
case 'x': case 'x':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment