Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 82187 - broken source code
Summary: broken source code
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: linc
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-19 10:20 UTC by d.binderman
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-19 15:48:50 UTC


Attachments (Terms of Use)

Description d.binderman 2003-01-19 10:20:16 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I just tried to compile package linc-0.5.2-2 from Redhat 8.0

The compiler said

linc-protocols.c:419: warning: operation on `idx' may be undefined

Function parameter evaluation order is undefined. 
Here is an untested patch to shut up the compiler

*** ./src/linc-protocols.c.old	2003-01-16 20:39:48.000000000 +0000
--- ./src/linc-protocols.c	2003-01-16 20:40:34.000000000 +0000
***************
*** 414,422 ****
  		gettimeofday (&t, NULL);
  		g_snprintf (buf, sizeof (buf),
  			    "%s/linc-%x-%x-%x%x", linc_tmpdir,
! 			    pid, idx++,
  			    (guint) (rand() ^ t.tv_sec),
  			    (guint) (idx ^ t.tv_usec));
  #ifdef CONNECTION_DEBUG
  		if (g_file_test (buf, G_FILE_TEST_EXISTS))
  			g_warning ("'%s' already exists !", buf);
--- 414,423 ----
  		gettimeofday (&t, NULL);
  		g_snprintf (buf, sizeof (buf),
  			    "%s/linc-%x-%x-%x%x", linc_tmpdir,
! 			    pid, idx,
  			    (guint) (rand() ^ t.tv_sec),
  			    (guint) (idx ^ t.tv_usec));
+ 		idx++;
  #ifdef CONNECTION_DEBUG
  		if (g_file_test (buf, G_FILE_TEST_EXISTS))
  			g_warning ("'%s' already exists !", buf);

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


How reproducible:
Always

Steps to Reproduce:
1. compile the program
2.
3.
    

Additional info

Comment 1 Havoc Pennington 2003-01-19 15:48:50 UTC
Filed as http://bugzilla.gnome.org/show_bug.cgi?id=103879, 
thanks. (Closing here but we will get the fix in a new version of 
linc)


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