On 1-May-10, at 4:18 PM, Brian Raderman wrote:

Hi David,
...
* Removed the dummy1() function from keychain.c. Keychain.c/.h are based on cryptoapi.c/.h in the openvpn source tree. When editing the original file to work with the Keychain services libraries instead of the Windows Crypto API, I decided to change as little as possible, the theory being that what was there was approved and accepted. You will see a static dummy() function defined at the bottom of that file as well. I had no idea what it was there for, but I figured there was a reason for it so I left it alone. I think I tacked on the 1 to the end without thinking too hard because I was being very defensive and trying to prevent a scope problem, which was silly of me because the function is static and you would never compile Windows-only and Mac-only code at the same time. If you grep for "dummy" in the source tree, you will see a number of places where this paradigm is used. Perhaps because some compilers will not compile a file that has had all of its code ifdef'd out?

From a recent patch to Maria (database), I believe this may be the case on Windows, for example:

+#elif defined(__WIN__)
+
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+
#endif

I can't fully confirm this right now as I am away from my Linux/WINE environment that runs the MS Visual C++ Express toolchain.

--Toby


I tested this theory on my mac and no error occurred, so I went ahead and removed the function per your request. I should also point out that cryptoapi.c makes calls to calloc, which you may want to change at some point if you are trying to standardize on the gc_arena API.

Please let me know if you have any questions or if more changes are required.

Thanks,
Brian Raderman


Reply via email to