nats.c
                                
                                 nats.c copied to clipboard
                                
                                    nats.c copied to clipboard
                            
                            
                            
                        No visibility attributes on functions
Internal functions should have __attribute__((visibility("hidden"))) and public API functions should have attribute __attribute__((visibility("default"))) (or MSVC equivalent). CMake can generate appropriate macros https://cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html.
The reason to do this is to avoid polluting the dynamic symbol table with internal functions and allow LTO to optimize better.