Bug 78705 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kon2
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact:
URL:
Whiteboard:
: 105837 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-27 23:24 UTC by d.binderman
Modified: 2007-04-18 16:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-24 09:42:25 UTC
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2002-11-27 23:24:16 UTC
Description of Problem:

Hello there,

I just tried to compile package kon2-0.3.9b-13 from Redhat 8.0.

Here are some of the compiler messages.

mouse.c:219: warning: `cf' might be used uninitialized in this function
fld.c:47: warning: `type' might be used uninitialized in this function
bdf.c:55: warning: `code' might be used uninitialized in this function
mkminifont.c:28: warning: too few arguments for format

Here is a patch which fixes the messages.

*** ./font/bdf.c.old	2002-11-11 14:08:30.000000000 +0000
--- ./font/bdf.c	2002-11-11 14:08:43.000000000 +0000
***************
*** 52,58 ****
  {
      char *fdata = NULL, line[256], *p, *w, reg[256];
      u_char ch, ch2;
!     int	num, width, high, i, code, data, k, n;
      struct fontRegs *fReg;
      struct fontLoaderRegs *fldReg;
  
--- 52,58 ----
  {
      char *fdata = NULL, line[256], *p, *w, reg[256];
      u_char ch, ch2;
!     int	num, width, high, i, code = 0, data, k, n;
      struct fontRegs *fReg;
      struct fontLoaderRegs *fldReg;
  
*** ./font/fld.c.old	2002-11-11 14:07:59.000000000 +0000
--- ./font/fld.c	2002-11-11 14:08:12.000000000 +0000
***************
*** 44,50 ****
      int i, n;
      FILE *fp = stdin;
      enum {ST_ARG, ST_UNLOAD, ST_TYPE} st=ST_ARG;
!     char *path, *type, *p;
      u_char *font;
      int forceLoad=1;
  
--- 44,50 ----
      int i, n;
      FILE *fp = stdin;
      enum {ST_ARG, ST_UNLOAD, ST_TYPE} st=ST_ARG;
!     char *path, *type = 0, *p;
      u_char *font;
      int forceLoad=1;
  
*** ./src/mouse.c.old	2002-11-11 14:07:31.000000000 +0000
--- ./src/mouse.c	2002-11-11 14:07:44.000000000 +0000
***************
*** 216,222 ****
  void	MouseSetBaud(int mfd, u_short baud, u_short cflag)
  {
  	struct termios mio;
! 	char	*cf;
  
  	tcgetattr(mfd, &mio);
  
--- 216,222 ----
  void	MouseSetBaud(int mfd, u_short baud, u_short cflag)
  {
  	struct termios mio;
! 	char	*cf = 0;
  
  	tcgetattr(mfd, &mio);
  
*** ./tools/mkminifont.c.old	2002-11-11 14:09:06.000000000 +0000
--- ./tools/mkminifont.c	2002-11-11 14:10:15.000000000 +0000
***************
*** 25,31 ****
  	} else path = argv[i];
      }
      if (!path) {
! 	printf("usage: %s [minix font file]\n");
  	exit(1);
      }
      if ((font = LoadFontFile(path, "minix", 0)) == NULL) {
--- 25,31 ----
  	} else path = argv[i];
      }
      if (!path) {
! 	printf( "usage: %s [minix font file]\n", argv[ 0]);
  	exit(1);
      }
      if ((font = LoadFontFile(path, "minix", 0)) == NULL) {


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Akira TAGOH 2003-04-24 09:42:25 UTC
fixed in 0.3.9b-18

Comment 2 Akira TAGOH 2003-09-29 06:21:48 UTC
*** Bug 105837 has been marked as a duplicate of this bug. ***


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