Bug 113908 - glib-2.2.3/tests/patterntest.c fails in compile
Summary: glib-2.2.3/tests/patterntest.c fails in compile
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: glib
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Owen Taylor
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-20 00:59 UTC by Need Real Name
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-01-20 19:01:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2004-01-20 00:59:31 UTC
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-20 01:15:19 UTC
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 19:01:55 UTC
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.