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 80639 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: Canna
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Bill Huang
URL:
Whiteboard:
: 80641 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-29 09:18 UTC by d.binderman
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-21 12:20:27 UTC


Attachments (Terms of Use)

Description d.binderman 2002-12-29 09:19:21 UTC
Description of problem:

Hello there,

I have just tried to compile package Canna-3.5b2-70.

I got the following two messages from the compiler.

cc: Warning: cshost.c, line 197: Non-void function "WriteToServer" does not contain a return statement. (missingreturn)
int
^

cc: Error: kctrl.c, line 2181: In this statement, a common type could not be determined for the 2nd and 3rd operands ("strdup(...)" and "(char ...)0") of 
a conditional operator. (badcondit)
    uname = arg->uname ? strdup(arg->uname) : (char *)0;
------------^


Here is a suggested patch for a minor tidy up

./Canna35b2/cmd/cshost/cshost.c.old ./Canna35b2/cmd/cshost/cshost.c
*** ./Canna35b2/cmd/cshost/cshost.c.old	Sat Nov 30 14:05:17 2002
--- ./Canna35b2/cmd/cshost/cshost.c	Sat Nov 30 14:20:59 2002
***************
*** 72,77 ****
--- 72,79 ----
  
  extern int errno;
  
+ static void WriteToServer( char * Buffer, int size );
+ 
  main(argc, argv)
  int argc ;
  char **argv ;
***************
*** 194,203 ****
      }
      RkwFinalize();						/* S000 */
  }
! int
! WriteToServer( Buffer, size )
! char *Buffer ;
! int size ;
  {
      register int todo;
      register int write_stat;
--- 196,204 ----
      }
      RkwFinalize();						/* S000 */
  }
! 
! static void
! WriteToServer( char * Buffer, int size )
  {
      register int todo;
      register int write_stat;
./Canna35b2/lib/canna/kctrl.c.old ./Canna35b2/lib/canna/kctrl.c
*** ./Canna35b2/lib/canna/kctrl.c.old	Sat Nov 30 14:09:18 2002
--- ./Canna35b2/lib/canna/kctrl.c	Sat Nov 30 14:09:29 2002
***************
*** 27,32 ****
--- 27,33 ----
  #include "canna.h"
  
  #include <errno.h>
+ #include <string.h>
  #include <sys/types.h>
  #include <canna/mfdef.h>
  


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Akira TAGOH 2003-04-21 10:06:18 UTC
*** Bug 80641 has been marked as a duplicate of this bug. ***

Comment 2 Akira TAGOH 2003-04-21 12:20:27 UTC
fixed in 3.6-15


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