diff options
author | Tony Cook <tony@develop-help.com> | 2016-03-15 11:26:26 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-03-15 11:26:26 +1100 |
commit | d60341990a480cabcbb36cbfde9bfcae6738f419 (patch) | |
tree | 3f1d65ab3063fb77af3644387532614f61d8f681 /dist | |
parent | ce12e2548182b5bf6788188c520311eef0eca0ca (diff) | |
download | perl-d60341990a480cabcbb36cbfde9bfcae6738f419.tar.gz |
avoid generating an empty statement outside a function on non-clang
On non-clang compilers, the code:
CLANG_DIAG_RESTORE;
outside a function generated a simple empty statement (or empty
declaration), which is invalid syntax outside a function in C,
causing a warning from the solaris studio compiler.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/threads/threads.xs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs index 891d4d13ac..d35eee17b2 100644 --- a/dist/threads/threads.xs +++ b/dist/threads/threads.xs @@ -1021,7 +1021,9 @@ S_ithread_create( CLANG_DIAG_IGNORE(-Wthread-safety); /* warning: mutex 'thread->mutex' is not held on every path through here [-Wthread-safety-analysis] */ } +#if defined(__clang__) || defined(__clang) CLANG_DIAG_RESTORE; +#endif #endif /* USE_ITHREADS */ |