mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Remove a push warning causing failing assert. Modified storage/connect/filamap.cpp
This commit is contained in:
@@ -607,4 +607,27 @@ char *PlugDup(PGLOBAL g, const char *str)
|
||||
|
||||
} // end of PlugDup
|
||||
|
||||
/*--------------------- End of PLUGUTIL program -----------------------*/
|
||||
/*************************************************************************/
|
||||
/* This routine makes a pointer from an offset to a memory pointer. */
|
||||
/*************************************************************************/
|
||||
void* MakePtr(void* memp, size_t offset) {
|
||||
// return ((offset == 0) ? NULL : &((char*)memp)[offset]);
|
||||
return (!offset) ? NULL : (char *)memp + offset;
|
||||
} /* end of MakePtr */
|
||||
|
||||
/*************************************************************************/
|
||||
/* This routine makes an offset from a pointer new format. */
|
||||
/*************************************************************************/
|
||||
size_t MakeOff(void* memp, void* ptr) {
|
||||
if (ptr) {
|
||||
#if defined(_DEBUG) || defined(DEVELOPMENT)
|
||||
if (ptr <= memp)
|
||||
fprintf(stderr, "ptr %p <= memp %p", ptr, memp);
|
||||
#endif // _DEBUG || DEVELOPMENT
|
||||
return (size_t)((char*)ptr - (size_t)memp);
|
||||
} else
|
||||
return 0;
|
||||
|
||||
} /* end of MakeOff */
|
||||
|
||||
/*--------------------- End of PLUGUTIL program -----------------------*/
|
||||
|
Reference in New Issue
Block a user