Bug 80639 - bad source code
bad source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: Canna (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
:
: 80641 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-29 04:18 EST by d.binderman
Modified: 2007-04-18 12:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-21 08:20:27 EDT
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 d.binderman 2002-12-29 04:19:21 EST
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 06:06:18 EDT
*** Bug 80641 has been marked as a duplicate of this bug. ***
Comment 2 Akira TAGOH 2003-04-21 08:20:27 EDT
fixed in 3.6-15

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