Skip to content

Commit cba7105

Browse files
authored
Merge pull request #76 from rchen20/bugfix/chen59/unusedvars
Specify unused vars in resource test for old gccs.
2 parents c77d02c + 00e0537 commit cba7105

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/camp/defines.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace camp
2727
{
2828

2929
#if defined(__NVCC__)
30-
#define CAMP_ALLOW_UNUSED_LOCAL(X) sink(X)
30+
#define CAMP_ALLOW_UNUSED_LOCAL(X) camp::sink(X)
3131
#else
3232
#define CAMP_ALLOW_UNUSED_LOCAL(X) (void)(X)
3333
#endif

test/resource.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ TEST(CampEventProxy, Get)
252252
{
253253
EventProxy<Host> ep{h1};
254254
HostEvent e = ep;
255+
CAMP_ALLOW_UNUSED_LOCAL(e);
255256
}
256257

257258
{
@@ -264,6 +265,7 @@ TEST(CampEventProxy, Get)
264265

265266
{
266267
HostEvent e = do_stuff(h1);
268+
CAMP_ALLOW_UNUSED_LOCAL(e);
267269
}
268270

269271
{
@@ -283,6 +285,7 @@ TEST(CampEventProxy, Get)
283285
{
284286
EventProxy<Host> ep{h1};
285287
HostEvent e = ep.get();
288+
CAMP_ALLOW_UNUSED_LOCAL(e);
286289
}
287290
}
288291

0 commit comments

Comments
 (0)