Bug 113908 - glib-2.2.3/tests/patterntest.c fails in compile
glib-2.2.3/tests/patterntest.c fails in compile
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: glib (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Owen Taylor
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-19 19:59 EST by Need Real Name
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-20 14:01:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2004-01-19 19:59:31 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030704

Description of problem:
the list of local variables is malfourmed. The ordering needs changing.

Current:
  va_start (args, format);;

  gchar* msg = g_strdup_vprintf (format, args);

Need:
  gchar* msg = g_strdup_vprintf (format, args);
  va_start (args, format);;


what can I say va_start is a macro an variables must come first...

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

How reproducible:
Always

Steps to Reproduce:
1. Have older version of compiler.gcc version 2.96 20000731 (Red Hat
Linux 7.3 2.96-110)
2. rebuild package
3.
    

Actual Results:  failure

Expected Results:  i386.rpm

Additional info:

just reorder the two statements and it fixes the eror.
Comment 1 Need Real Name 2004-01-19 20:15:19 EST
You ever get those days were youre brain dead, I know that I do.
Here is the correct code snipet. While va_start is code 
g_strdup_vprintf must come after it. sigh


  gchar* msg; 
  va_start (args, format);;
  msg=g_strdup_vprintf (format, args);
Comment 2 Owen Taylor 2004-01-20 14:01:55 EST
This is been fixed in GNOME CVS, but anyways, should compile fine
with the supported Red Hat compiler ... C++ style mixing
of code and declarations is in the C99 standard.

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