[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#795725: unicon: PhraseLevel declared without type



Package: unicon
Version: 3.0.4-14
Usertags: goto-cc
Severity: minor
Tags: patch

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed. Please note that we use our research compiler
tool-chain (using tools from the cbmc package), which permits extended reporting
on type inconsistencies at link time.

GCC reports this as follows:

gcc -g -c -I. -I../../include addphrase.c -o addphrase.o
In file included from addphrase.c:34:0:
./test.h:1:1: warning: data definition has no type or storage class
 PhraseLevel[256] = { 
 ^
./test.h:1:1: warning: type defaults to 'int' in declaration of 'PhraseLevel' [-Wimplicit-int]

The attached patch introduces the type declaration.

Best,
Michael

diff -urN a/unicon/ImmModules/turbo/levelphrase.c b/unicon/ImmModules/turbo/levelphrase.c
--- a/unicon/ImmModules/turbo/levelphrase.c	2015-08-16 13:59:40.000000000 +0100
+++ b/unicon/ImmModules/turbo/levelphrase.c	2015-08-16 14:00:24.000000000 +0100
@@ -169,7 +169,7 @@
     FILE *fp;
     int i;
     fp = fopen (szFileName, "wt");
-    fprintf (fp, "PhraseLevel[256] = { \n    ");
+    fprintf (fp, "int PhraseLevel[256] = { \n    ");
     for (i = 0; i  < 256; i++)
     {
         if (i % 16 == 0)
diff -urN a/unicon/ImmModules/turbo/test.h b/unicon/ImmModules/turbo/test.h
--- a/unicon/ImmModules/turbo/test.h	2015-08-16 13:57:04.000000000 +0100
+++ b/unicon/ImmModules/turbo/test.h	2015-08-16 13:59:48.000000000 +0100
@@ -1,4 +1,4 @@
-PhraseLevel[256] = { 
+int PhraseLevel[256] = { 
     
     0,30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,
     480,510,540,570,600,630,660,690,720,750,780,810,840,870,900,930,

Attachment: pgpsLu0p8Glk6.pgp
Description: PGP signature


Reply to: