Only remove __attributes__ in Windows builds

This commit is contained in:
Erika Thorsen 2016-11-28 08:35:08 +01:00
parent afea72f494
commit 2aa10de1a8
1 changed files with 6 additions and 1 deletions

View File

@ -103,7 +103,12 @@ static void ASN_DEBUG(const char *fmt, ...) { (void)fmt; }
* Check stack against overflow, if limit is set.
*/
#define ASN__DEFAULT_STACK_MAX (30000)
static int ASN__STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) {
#ifdef _WIN32
static int
#else
static int __attribute__((unused))
#endif
ASN__STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) {
if(ctx && ctx->max_stack_size) {
/* ctx MUST be allocated on the stack */