Thinking of glib's GObject (and) Introspection API

Milan Crha mcrha at redhat.com
Sun May 8 23:55:32 PDT 2016


On Fri, 2016-05-06 at 10:36 -0400, Allen Winter wrote:
> we already have this code in config.h.cmake.  question is why it
> isn't being used with mingw.  can you look at fixing this just once
> inside config.h.cmake?

	Hi,
my bad, I didn't realize it's there already. The MinGW actually uses
that code, the warning it shows here is that the members of
the 'struct tm' can be used uninitialized. I thought it's due to the
gmtime_r() not being known (similar as in the evolution-data-server),
but I see now that I was wrong. When you compare my define and the
define you've used, then the only difference is that I also memset()
the tmp content with zeros, thus the warning about using uninitialized
variables went away.

Thinking of it, it was a very poor idea of "solving" the warnings, I'm
sorry for that. The correct solution would be to check whether
gmtime_r() returned non-NULL in the code and react based on it. Please
find the attached patch with this approach. Feel free to change the
return values on error, I thought these would work fine.
	Bye,
	Milan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Check-return-value-of-gmtime_r.patch
Type: text/x-patch
Size: 2702 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20160509/7a557678/attachment.bin>


More information about the libical-devel mailing list