Re: clang compiler warning in omniidl generated code
Duncan Grisby via omniORB-list <[email protected]> Thu, 26 Apr 2018 15:44:16 +0100
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2018-04-26 at 16:03 +0200, Peter Klotz via omniORB-list wrote: > IdlTypes.cpp:13:20: warning: unused variable '_0RL_library_version' > [-Wunused-variable] > static const char* _0RL_library_version = omniORB_4_2; > ^ > 1 warning generated. > -------------------- > > A simple omniidl patch silenced the warning but the question came up > what the variable is for. > The code seems fine without. It is not referenced or checked > anywhere. > What purpose does it serve? It saves you from trying to use stubs that were generated for omniORB 4.2 against any other version of the omniORB libraries. The omniORB 4.2 library exports the symbol omniORB_4_2. If you try to compile or link your generated stubs with omniORB 4.1.x, for example, the symbol will be missing and the compiler or linker will complain. It's unfortunate that clang warns about it. I'm not sure what can be done about that. Duncan. -- -- Duncan Grisby -- -- [email protected] -- -- http://www.grisby.org -- _______________________________________________ omniORB-list mailing list [email protected] http://www.omniorb-support.com/mailman/listinfo/omniorb-list