Comment 0 for bug 15347

Revision history for this message
In , Andreas Jochens (aj-andaco) wrote :

Package: ots
Severity: normal
Tags: patch

When building 'ots' on amd64 with gcc-4.0,
I get the following error:

 x86_64-linux-gcc -DHAVE_CONFIG_H -DVERSION=\"0.4.2\" -DDICTIONARY_DIR=\"/usr/share/ots/\" -I. -I. -I.. -I.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -g -O2 -MT article.lo -MD -MP -MF .deps/article.Tpo -c article.c -fPIC -DPIC -o .libs/article.o
article.c: In function 'ots_new_sentence':
article.c:38: error: invalid lvalue in assignment
article.c: In function 'ots_append_word':
article.c:107: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
article.c:109: warning: pointer targets in passing argument 1 of 'g_strdup' differ in signedness
make[3]: *** [article.lo] Error 1
make[3]: Leaving directory `/ots-0.4.2+cvs.2004.02.20/src'

With the attached patch 'ots' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/ots-0.4.2+cvs.2004.02.20/src/article.c ./src/article.c
--- ../tmp-orig/ots-0.4.2+cvs.2004.02.20/src/article.c 2004-02-06 04:41:43.000000000 +0100
+++ ./src/article.c 2004-12-30 20:27:35.568549904 +0100
@@ -35,7 +35,7 @@
 ots_new_sentence (void)
 {
   OtsSentence *aLine = g_new0 (OtsSentence, 1);
- (GList *) aLine->words = NULL;
+ aLine->words = NULL;
   aLine->wc = 0;
   aLine->selected = 0;
   aLine->score = 0;