wtetzner / bitstring

Automatically exported from code.google.com/p/bitstring
GNU General Public License v2.0
0 stars 0 forks source link

Compilation fails due to void pointer arithmetic #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. configure
2. make
3. compilation fails due to arithmetic on void*

What is the expected output? What do you see instead?
Should compile

What version of the product are you using? On what operating system?
bitstring v2.0.4 on Opensuse

Please provide any additional information below.
replaching void* with char * seems to fix it, see attached patch

Original issue reported on code.google.com by bernhard...@gmail.com on 18 Jul 2014 at 11:47

Attachments:

GoogleCodeExporter commented 8 years ago
Compilation does *not* fail for me.  What's the error message?

Original comment by richard....@gmail.com on 30 Jul 2014 at 7:41

GoogleCodeExporter commented 8 years ago
The error messages comes from the -Werror-pointer-arith flag I use:
bitstring_c.c: In function 
‘ocaml_bitstring_extract_fastpath_int16_be_unsigned’:
bitstring_c.c:83:1: error: pointer of type ‘void *’ used in arithmetic 
[-Werror=pointer-arith]

Original comment by bernhard...@gmail.com on 31 Jul 2014 at 8:11

GoogleCodeExporter commented 8 years ago
I pushed your patch (modified slightly to apply to the new code).

Original comment by richard....@gmail.com on 31 Jul 2014 at 11:17