Skip to content

Pointer signedness mismatch in wmemset_s() #23

Closed
@mgherzan

Description

@mgherzan

safestring/safeclib/wmemset_s.c: In function 'wmemset_s':
safestring/safeclib/wmemset_s.c:101:20: error: pointer targets in passing argument 1 of 'mem_prim_set32' differ in signedness [-Werror=pointer-sign]
mem_prim_set32(dest, len, value);
^~~~
In file included from safestring/safeclib/wmemset_s.c:34:
safestring/safeclib/mem_primitives_lib.h:71:1: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'wchar_t *' {aka 'int *'}
mem_prim_set32(uint32_t *dest, uint32_t dmax, uint32_t value);
^~~~~~~~~~~~~~
cc1: all warnings being treated as errors

$ cc --version
cc (Ubuntu 8.2.0-7ubuntu1) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions