uintptr_t is an unsigned integer memsize-type that can safely store a pointer regardless of the platform capacity. The type uintptr_t is similar to the types size_t and UINT_PTR. The size of the type depends upon the data model. To learn more about memsize types and ways of using them see the article "About size_t and ptrdiff_t".

Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;