attoparsec icon indicating copy to clipboard operation
attoparsec copied to clipboard

Deprecation warning for `memset` and `memcpy` with `bytestring >= 0.11.5`

Open andreasabel opened this issue 2 years ago • 1 comments

$ cabal build --constraint='bytestring >=0.12' --allow-newer=bytestring
...
internal/Data/Attoparsec/ByteString/FastSet.hs:97:18: warning: [-Wdeprecations]
    In the use of ‘memset’
    (imported from Data.ByteString.Internal, but defined in bytestring-0.11.5.0:Data.ByteString.Internal.Type):
    Deprecated: "Use Foreign.Marshal.Utils.fillBytes instead"
   |
97 |             _ <- I.memset t 0 32
   |                  ^^^^^^^^
...
internal/Data/Attoparsec/ByteString/Buffer.hs:121:11: warning: [GHC-68441] [-Wdeprecations]
    In the use of ‘memcpy’
    (imported from Data.ByteString.Internal, but defined in Data.ByteString.Internal.Type):
    Deprecated: "Use Foreign.Marshal.Utils.copyBytes instead"
    |
121 |           memcpy (ptr0 `plusPtr` (off0+len0))
    |           ^^^^^^
...

andreasabel avatar Jul 12 '23 14:07 andreasabel

Stumbled upon accidentally the same warnings, opened a quick fix at #221

topikettunen avatar Aug 02 '23 13:08 topikettunen