Bug 165628 - fsck.cramfs.c:98: error: variable-size type declared outside of any function
fsck.cramfs.c:98: error: variable-size type declared outside of any function
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-08-10 18:07 EDT by David Cantrell
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-15 08:03:41 EDT
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 David Cantrell 2005-08-10 18:07:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050705

Description of problem:
If building util-linux-2.12p-10 with gcc-3.4.4 on i386, you get this error:

fsck.cramfs.c:98: error: variable-size type declared outside of any function

The simple fix to to patch disk-utils/fsck.cramfs.c by changing line 81 from:



#define PAGE_CACHE_SIZE (sizeof((int) PAGE_SIZE))

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

How reproducible:

Steps to Reproduce:
1. Ensure you have gcc-3.4.x.
2. Get the source RPM.
3. Rebuild it.
4. See error.

Actual Results:  This isn't a problem with the binary package, but rather a patch to make it compile correctly.

Expected Results:  Uhh, to be able to compile the source.

Additional info:
Comment 1 Karel Zak 2005-08-11 03:16:55 EDT
Thanks for report, but sizeof() is bad idea -- it returns size of object in
memory. It means 4 bytes (for 32bit int) -- original macro is >=4096.
Comment 2 Karel Zak 2005-08-11 04:00:03 EDT
BTW, I cannot reproduce it with gcc 4.0 or 3.2. You report is for devel branch,
but there's gcc4. We have gcc 3.4 in FC3, but there's different code in
Comment 3 David Cantrell 2005-08-11 09:50:47 EDT
Just built with gcc 4.x and it's fine.  Disregard my report.  Gcc major version
changes can be annoying.

And yeah, I know what sizeof() does.  One of those stupid brain misfunction

Thanks and sorry to waste your time.

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