Skip to content

Commit fcf2d4d

Browse files
committed
FIX: msvc compiler warnings
1 parent f6443ce commit fcf2d4d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/core/m-pools.c

+4
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
278278
pool = &Mem_Pools[pool_id];
279279
if (!pool->first) Fill_Pool(pool);
280280
node = pool->first;
281+
#pragma warning(suppress: 28182)
281282
pool->first = *node;
282283
#ifdef WATCH_SERIES_POOL
283284
printf(cs_cast("*** SERIES_POOL Make_Node=> has: %u free: %u\n"), Mem_Pools[SERIES_POOL].has, Mem_Pools[SERIES_POOL].free);
@@ -334,6 +335,7 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
334335
pool = &Mem_Pools[pool_num];
335336
if (!pool->first) Fill_Pool(pool);
336337
node = pool->first;
338+
#pragma warning(suppress: 28182)
337339
pool->first = *node;
338340
pool->free--;
339341
length = pool->wide;
@@ -406,9 +408,11 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
406408
pool = &Mem_Pools[pool_num];
407409
if (!pool->first) Fill_Pool(pool);
408410
node = pool->first;
411+
#pragma warning(suppress: 28182)
409412
pool->first = *node;
410413
pool->free--;
411414
length = pool->wide;
415+
#pragma warning(suppress: 28183)
412416
memset(node, 0, length);
413417
#ifdef WATCH_SERIES_POOL
414418
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);

src/os/win32/dev-file.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,11 @@ static BOOL Seek_File_64(REBREQ *file)
180180
{
181181
HANDLE h= (HANDLE)(dir->handle);
182182
REBCHR *cp = 0;
183-
REBCNT len;
183+
REBLEN len;
184184
if (!h) {
185-
len = (1 + GetLogicalDriveStrings(0, NULL)) << 1;
186-
h = MAKE_MEM(len);
185+
len = (1 + GetLogicalDriveStrings(0, NULL));
186+
h = MAKE_MEM(len << 1);
187+
if (!h) return DR_ERROR;
187188
GetLogicalDriveStrings(len, h);
188189
dir->length = len;
189190
dir->actual = 0;

0 commit comments

Comments
 (0)