Skip to content

Commit 8cdfbbd

Browse files
committed
address warnings
Change-Id: I6eec9175541c670ca320cbdb2963c4215f1656cc
1 parent 4a733de commit 8cdfbbd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/topologyentry.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ inline bool initCoreMasks(uint32 & smtMaskWidth, uint32 & coreMaskWidth, uint32
188188
DBG(1, "Number of threads sharing L3 cache = " , threadsSharingL3, " [the most significant bit = " , l3CacheMaskShift , "]");
189189
#endif
190190

191+
(void) threadsSharingL2; // to suppress warnings on MacOS (unused vars)
192+
(void) threadsSharingL3; // to suppress warnings on MacOS (unused vars)
193+
191194
// Validate l3CacheMaskShift and ensure the bit range is correct
192195
if (l3CacheMaskShift > 31)
193196
{
@@ -197,6 +200,7 @@ inline bool initCoreMasks(uint32 & smtMaskWidth, uint32 & coreMaskWidth, uint32
197200
return false;
198201
}
199202

203+
#ifndef USER_KERNEL_SHARED
200204
uint32 it = 0;
201205

202206
for (int i = 0; i < 100; ++i)
@@ -225,13 +229,11 @@ inline bool initCoreMasks(uint32 & smtMaskWidth, uint32 & coreMaskWidth, uint32
225229
{
226230
CacheMaskShift++;
227231
}
228-
229-
#ifndef USER_KERNEL_SHARED
230232
DBG(1, "Max number of threads sharing L" , level , " " , cacheTypeStr , " cache = " , threadsSharingCache, " [the most significant bit = " , CacheMaskShift , "]",
231233
" shift = " , CacheMaskShift);
232-
#endif
233234
++it;
234235
}
236+
#endif
235237
}
236238
return true;
237239
}

0 commit comments

Comments
 (0)