Comment 3 for bug 15280

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 13 Dec 2004 22:56:16 +0100
From: Andreas Jochens <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: bluez-hcidump: FTBFS (amd64/gcc-4.0): static declaration of 'sdp_siz_idx_lookup_table'
 follows non-static declaration

Package: bluez-hcidump
Severity: normal
Tags: patch

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

cc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -g -Wall -O2 -c `test -f 'sdp.c' || echo './'`sdp.c
sdp.c:39: error: static declaration of 'sdp_siz_idx_lookup_table' follows non-static declaration
sdp.h:160: error: previous declaration of 'sdp_siz_idx_lookup_table' was here
sdp.c:50: error: static declaration of 'sdp_uuid_nam_lookup_table' follows non-static declaration
sdp.h:167: error: previous declaration of 'sdp_uuid_nam_lookup_table' was here
sdp.c:104: error: static declaration of 'sdp_attr_id_nam_lookup_table' follows non-static declaration
sdp.h:176: error: previous declaration of 'sdp_attr_id_nam_lookup_table' was here
sdp.c: In function 'print_int':
sdp.c:219: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t'
sdp.c:222: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t'
sdp.c:231: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t'
make[3]: *** [sdp.o] Error 1
make[3]: Leaving directory `/bluez-hcidump-1.12/parser'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/bluez-hcidump-1.12/parser/sdp.c ./parser/sdp.c
--- ../tmp-orig/bluez-hcidump-1.12/parser/sdp.c 2004-09-22 19:06:56.000000000 +0200
+++ ./parser/sdp.c 2004-12-13 22:51:27.150890248 +0100
@@ -36,7 +36,7 @@
 #include "parser.h"
 #include "sdp.h"

-static sdp_siz_idx_lookup_table_t sdp_siz_idx_lookup_table[] = {
+sdp_siz_idx_lookup_table_t sdp_siz_idx_lookup_table[] = {
  { 0, 1 }, /* Size index = 0 */
  { 0, 2 }, /* 1 */
  { 0, 4 }, /* 2 */
@@ -47,7 +47,7 @@
  { 1, 4 }, /* 7 */
 };

-static sdp_uuid_nam_lookup_table_t sdp_uuid_nam_lookup_table[] = {
+sdp_uuid_nam_lookup_table_t sdp_uuid_nam_lookup_table[] = {
  { SDP_UUID_SDP, "SDP" },
  { SDP_UUID_UDP, "UDP" },
  { SDP_UUID_RFCOMM, "RFCOMM" },
@@ -101,7 +101,7 @@
  { SDP_UUID_VIDEO_SINK, "VideoSink" } /* VDP */
 };

-static sdp_attr_id_nam_lookup_table_t sdp_attr_id_nam_lookup_table[] = {
+sdp_attr_id_nam_lookup_table_t sdp_attr_id_nam_lookup_table[] = {
  { SDP_ATTR_ID_SERVICE_RECORD_HANDLE, "SrvRecHndl" },
  { SDP_ATTR_ID_SERVICE_CLASS_ID_LIST, "SrvClassIDList" },
  { SDP_ATTR_ID_SERVICE_RECORD_STATE, "SrvRecState" },