Bug 110691 - bad source code
bad source code
Product: Fedora
Classification: Fedora
Component: alchemist (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2003-11-23 10:59 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 1.0.30-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-08 12:38:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-11-23 10:59:21 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package alchemist-1_0_27-3, from Redhat's
Fedora system.

The compiler said

triggerblackbox.c(69): error: expected a ";"
        void clear(AdmRefStr **array) {

The source code is

static void
triggerblackbox_free (void     *data)
        void clear(AdmRefStr **array) {
                unsigned int i=0;
                while (array[i] != NULL) {
        struct triggerblackbox_instance *in_p = data;



This isn't ISO C code - nested functions are not allowed. 

Suggest conform to ISO C language standard and move the definition of 
clear outside triggerblackbox_free.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. compile with ISO C compiler.

Additional info:
Comment 1 Tim Waugh 2004-01-05 07:37:17 EST
We compile with gcc.
Comment 2 d.binderman 2004-01-05 15:05:12 EST
>We compile with gcc.

True, but can I interest you in getting the code to
conform with international standards, not just a feature
of only one compiler ?

That way, when the code conforms with the standard ISO C,
then other, better, compilers can be used on the source code.

Which leads to a better product.
Comment 3 Tim Waugh 2004-01-06 06:22:19 EST
Sure, send a patch.  But alchemist is something that is being slowly
phased out, and no new development is going to be done on it.
Comment 4 Tim Waugh 2004-01-08 12:38:02 EST
A whole slew of mistaken '&'s and '|'s  turned up, so while fixing
them I unnested this function too.

Note You need to log in before you can comment on or make changes to this bug.