Package: orage
Version: 4.5.12.2-1
Severity: important
Tags: patch
Usertags: implicit-pointer-conversion

Our automated buildd log filter[1] detected a problem that is likely to
cause your package to segfault on architectures where the size of a
pointer is greater than the size of an integer, such as ia64 and amd64.

  Function `strptime' implicitly converted to pointer at functions.c:332

This is often due to a missing function prototype definition.
For more information, see [2].

The following patch moves the XOPEN_SOURCE define above all
includes. This fixes the issue, likely because time.h is already
included via one of them.

This patch also adds an additional include directive for gprintf.h to
remove another warning:

  functions.c: In function 'orage_tm_time_to_icaltime':
  functions.c:402: warning: implicit declaration of function 'g_sprintf'

[1] http://people.debian.org/~dannf/check-implicit-pointer-functions
[2] http://wiki.debian.org/ImplicitPointerConversions

--- orage-4.5.12.2.orig/src/functions.c 2008-01-20 21:22:12.000000000 -0700
+++ orage-4.5.12.2/src/functions.c      2008-02-13 12:55:56.000000000 -0700
@@ -21,16 +21,17 @@
 
  */
 
+#define _XOPEN_SOURCE /* glibc2 needs this */
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#define _XOPEN_SOURCE /* glibc2 needs this */
 #include <time.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 
 #include <glib.h>
+#include <glib/gprintf.h>
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
 
--- Begin Message ---
Function `strptime' implicitly converted to pointer at functions.c:332

--- End Message ---

Reply via email to