mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[warnigs] fixed readability-non-const-parameter
This commit is contained in:
@@ -1109,7 +1109,7 @@ extern "C"
|
||||
WINPR_API void Stream_AddRef(wStream* s);
|
||||
WINPR_API void Stream_Release(wStream* s);
|
||||
|
||||
WINPR_API wStream* StreamPool_Find(wStreamPool* pool, BYTE* ptr);
|
||||
WINPR_API wStream* StreamPool_Find(wStreamPool* pool, const BYTE* ptr);
|
||||
|
||||
WINPR_API void StreamPool_Clear(wStreamPool* pool);
|
||||
|
||||
|
||||
@@ -301,27 +301,26 @@ void Stream_Release(wStream* s)
|
||||
* Find stream in pool using pointer inside buffer
|
||||
*/
|
||||
|
||||
wStream* StreamPool_Find(wStreamPool* pool, BYTE* ptr)
|
||||
wStream* StreamPool_Find(wStreamPool* pool, const BYTE* ptr)
|
||||
{
|
||||
wStream* s = NULL;
|
||||
BOOL found = FALSE;
|
||||
|
||||
StreamPool_Lock(pool);
|
||||
|
||||
for (size_t index = 0; index < pool->uSize; index++)
|
||||
{
|
||||
s = pool->uArray[index];
|
||||
wStream* cur = pool->uArray[index];
|
||||
|
||||
if ((ptr >= Stream_Buffer(s)) && (ptr < (Stream_Buffer(s) + Stream_Capacity(s))))
|
||||
if ((ptr >= Stream_Buffer(cur)) && (ptr < (Stream_Buffer(cur) + Stream_Capacity(cur))))
|
||||
{
|
||||
found = TRUE;
|
||||
s = cur;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
StreamPool_Unlock(pool);
|
||||
|
||||
return (found) ? s : NULL;
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -658,8 +658,10 @@ fail:
|
||||
#endif
|
||||
}
|
||||
|
||||
// NOLINTBEGIN(readability-non-const-parameter)
|
||||
SSIZE_T winpr_convert_from_jpeg(const BYTE* comp_data, size_t comp_data_bytes, UINT32* width,
|
||||
UINT32* height, UINT32* bpp, BYTE** ppdecomp_data)
|
||||
// NOLINTEND(readability-non-const-parameter)
|
||||
{
|
||||
WINPR_ASSERT(comp_data || (comp_data_bytes == 0));
|
||||
WINPR_ASSERT(width);
|
||||
|
||||
@@ -1042,6 +1042,7 @@ int _connect(SOCKET s, const struct sockaddr* name, int namelen)
|
||||
return status;
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(readability-non-const-parameter)
|
||||
int _ioctlsocket(SOCKET s, long cmd, u_long* argp)
|
||||
{
|
||||
int fd = (int)s;
|
||||
|
||||
Reference in New Issue
Block a user