Skip to content

Commit

Permalink
FIX: msvc compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Apr 16, 2024
1 parent f6443ce commit fcf2d4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/core/m-pools.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
pool = &Mem_Pools[pool_id];
if (!pool->first) Fill_Pool(pool);
node = pool->first;
#pragma warning(suppress: 28182)
pool->first = *node;
#ifdef WATCH_SERIES_POOL
printf(cs_cast("*** SERIES_POOL Make_Node=> has: %u free: %u\n"), Mem_Pools[SERIES_POOL].has, Mem_Pools[SERIES_POOL].free);
Expand Down Expand Up @@ -334,6 +335,7 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
pool = &Mem_Pools[pool_num];
if (!pool->first) Fill_Pool(pool);
node = pool->first;
#pragma warning(suppress: 28182)
pool->first = *node;
pool->free--;
length = pool->wide;
Expand Down Expand Up @@ -406,9 +408,11 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
pool = &Mem_Pools[pool_num];
if (!pool->first) Fill_Pool(pool);
node = pool->first;
#pragma warning(suppress: 28182)
pool->first = *node;
pool->free--;
length = pool->wide;
#pragma warning(suppress: 28183)
memset(node, 0, length);
#ifdef WATCH_SERIES_POOL
if(pool_num == SERIES_POOL) printf(cs_cast("*** SERIES_POOL Make_Series=> has: %u free: %u (size: %u)\n"), Mem_Pools[SERIES_POOL].has, Mem_Pools[SERIES_POOL].free, length);
Expand Down
7 changes: 4 additions & 3 deletions src/os/win32/dev-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ static BOOL Seek_File_64(REBREQ *file)
{
HANDLE h= (HANDLE)(dir->handle);
REBCHR *cp = 0;
REBCNT len;
REBLEN len;
if (!h) {
len = (1 + GetLogicalDriveStrings(0, NULL)) << 1;
h = MAKE_MEM(len);
len = (1 + GetLogicalDriveStrings(0, NULL));
h = MAKE_MEM(len << 1);
if (!h) return DR_ERROR;
GetLogicalDriveStrings(len, h);
dir->length = len;
dir->actual = 0;
Expand Down

0 comments on commit fcf2d4d

Please sign in to comment.