Skip to content

Commit 52321c8

Browse files
mfepMathiasMagnus
authored andcommitted
Fixed warnings
1 parent cdffa24 commit 52321c8

3 files changed

Lines changed: 12 additions & 15 deletions

File tree

CL/cl_platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern "C" {
7777
#ifdef __GNUC__
7878
#define CL_API_SUFFIX_DEPRECATED __attribute__((deprecated))
7979
#define CL_API_PREFIX_DEPRECATED
80-
#elif defined(_WIN32)
80+
#elif defined(_MSC_VER) && !defined(__clang__)
8181
#define CL_API_SUFFIX_DEPRECATED
8282
#define CL_API_PREFIX_DEPRECATED __declspec(deprecated)
8383
#else

tests/pkgconfig/pkgconfig.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
#include <CL/cl.h>
22

3-
int main()
4-
{
5-
return sizeof(cl_platform_id) - sizeof(cl_context);
6-
}
3+
int main(void) { return sizeof(cl_platform_id) - sizeof(cl_context); }

tests/test_headers.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ will use inttypes.h for C compiles and cinttypes for C++ compiles.
2929

3030
#include "CL/cl.h"
3131

32-
int test_char()
32+
int test_char(void)
3333
{
3434
/* char */
3535
/* Constructor */
@@ -89,7 +89,7 @@ int test_char()
8989
return 0;
9090
}
9191

92-
int test_uchar()
92+
int test_uchar(void)
9393
{
9494
/* uchar */
9595
/* Constructor */
@@ -149,7 +149,7 @@ int test_uchar()
149149
return 0;
150150
}
151151

152-
int test_short()
152+
int test_short(void)
153153
{
154154
/* short */
155155
/* Constructor */
@@ -209,7 +209,7 @@ int test_short()
209209
return 0;
210210
}
211211

212-
int test_ushort()
212+
int test_ushort(void)
213213
{
214214
/* ushort */
215215
/* Constructor */
@@ -269,7 +269,7 @@ int test_ushort()
269269
return 0;
270270
}
271271

272-
int test_int()
272+
int test_int(void)
273273
{
274274
/* int */
275275
/* Constructor */
@@ -329,7 +329,7 @@ int test_int()
329329
return 0;
330330
}
331331

332-
int test_uint()
332+
int test_uint(void)
333333
{
334334
/* uint */
335335
/* Constructor */
@@ -389,7 +389,7 @@ int test_uint()
389389
return 0;
390390
}
391391

392-
int test_long()
392+
int test_long(void)
393393
{
394394
/* long */
395395
/* Constructor */
@@ -449,7 +449,7 @@ int test_long()
449449
return 0;
450450
}
451451

452-
int test_ulong()
452+
int test_ulong(void)
453453
{
454454
/* ulong */
455455
/* Constructor */
@@ -509,7 +509,7 @@ int test_ulong()
509509
return 0;
510510
}
511511

512-
int test_float()
512+
int test_float(void)
513513
{
514514
/* float */
515515
/* Constructor */
@@ -571,7 +571,7 @@ int test_float()
571571
return 0;
572572
}
573573

574-
int test_double()
574+
int test_double(void)
575575
{
576576
/* double */
577577
/* Constructor */

0 commit comments

Comments
 (0)