novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 459 forks source link

Ignoring return value of function declared with 'warm_unused_result' attribute SRWebSocket.m #582

Open gbenna opened 3 years ago

gbenna commented 3 years ago

I am using MQTT-Client-Framework in a project but get the following warning. Ignoring return value of function declared with 'warm_unused_result' attribute. This happens twice Once at line 509

NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16];
    SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);

and at line1499

 uint8_t *mask_key = frame_buffer + frame_buffer_size;
        SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
        frame_buffer_size += sizeof(uint32_t);

I am working on a Mac Book Pro running 11.0.1 Xcode 12.3 I installed Frameworks with Cocoapods My Broker is Adafruit.com

It doesn't seem to be effecting the running of the code. There is no direct message in the logs but still I get this warning. Any suggestions why and how to get rid of it?