insight/353: Insight-6.9.1 Build failure on Ubuntu 10.04 LTS x86

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

insight/353: Insight-6.9.1 Build failure on Ubuntu 10.04 LTS x86

Ulf Samuelsson-4

>Number:         353
>Category:       insight
>Synopsis:       Insight-6.9.1 Build failure on Ubuntu 10.04 LTS x86
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 07 21:23:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     [hidden email]
>Release:        unknown-1.0
>Organization:
>Environment:
Ubuntu 10.04 LTS x86
>Description:
The compiler bombs when calls are made
to routines declared to warn if return
value is not used.

The compiler complains that an array may be used
uninitialized
>How-To-Repeat:
mkdir arm
cd arm
../insight-6.8-1/configure --target=arm-linux-eabi --prefix=/usr/local/arm/arm-linux-eabi
make
>Fix:
Make sure that the return value is used.
Init the array to zero before use.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-patch; name="insight-6.8-1.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="insight-6.8-1.patch"

ZGlmZiAtdXJOIGluc2lnaHQtNi44LTEtMHJpZy9nZGIvY2xpL2NsaS1jbWRzLmMgaW5zaWdodC02
LjgtMS9nZGIvY2xpL2NsaS1jbWRzLmMKLS0tIGluc2lnaHQtNi44LTEtMHJpZy9nZGIvY2xpL2Ns
aS1jbWRzLmMJMjAwOC0wMS0wMSAyMzo1MzoxNC4wMDAwMDAwMDAgKzAxMDAKKysrIGluc2lnaHQt
Ni44LTEvZ2RiL2NsaS9jbGktY21kcy5jCTIwMTAtMDktMDcgMjI6NTY6MzguMDAwMDAwMDAwICsw
MjAwCkBAIC0zMjAsNyArMzIwLDcgQEAKIHsKICAgaWYgKGFyZ3MpCiAgICAgZXJyb3IgKF8oIlRo
ZSBcInB3ZFwiIGNvbW1hbmQgZG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