Bug 78463 - bad source code
bad source code
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: vnc (Show other bugs)
8.0
All Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-23 07:31 EST by d.binderman
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-08 10:01:51 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-11-23 07:31:23 EST
Description of Problem:

Hello there,

I just tried to compile package vnc-3.3.3r2-39 from Redhat 8.0.

Here are just some of the compiler messages.

makestrs.c:390: warning: too few arguments for format
set_trns.c:137: warning: operation on `pointer' may be undefined
token.c:108: warning: operation on `exponent' may be undefined
type1.c:395: warning: operation on `tmpx' may be undefined
type1.c:474: warning: operation on `tmpx' may be undefined
type1.c:539: warning: operation on `tmpx' may be undefined
type1.c:797: warning: operation on `tmpx' may be undefined
type1.c:801: warning: operation on `tmpx' may be undefined
type1.c:805: warning: operation on `tmpx' may be undefined
type1.c:1494: warning: operation on `tmpx' may be undefined
type1.c:1532: warning: operation on `tmpx' may be undefined
type1.c:1540: warning: operation on `tmpx' may be undefined
type1.c:1540: warning: operation on `tmpi' may be undefined
type1.c:1582: warning: operation on `tmpx' may be undefined
type1.c:1590: warning: operation on `tmpx' may be undefined
type1.c:1590: warning: operation on `tmpi' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:462: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbteblt8.c:527: warning: operation on `dst' may be undefined
cfbsolidC.c:216: warning: operation on `pdst' may be undefined
cfbsolidC.c:250: warning: operation on `pdst' may be undefined
cfbsolidC.c:303: warning: operation on `pdst' may be undefined
cfbsolidC.c:335: warning: operation on `pdst' may be undefined
cfbsolidC.c:337: warning: operation on `pdst' may be undefined
cfbsolidC.c:369: warning: operation on `pdst' may be undefined
cfbsolidC.c:370: warning: operation on `pdst' may be undefined
cfbsolidC.c:420: warning: operation on `pdst' may be undefined
cfbsolidC.c:421: warning: operation on `pdst' may be undefined
cfbsolidC.c:447: warning: operation on `pdst' may be undefined
cfbsolidC.c:448: warning: operation on `pdst' may be undefined
cfbsolidC.c:475: warning: operation on `pdst' may be undefined
cfbsolidC.c:531: warning: operation on `pdst' may be undefined
cfbsolidC.c:561: warning: operation on `pdst' may be undefined
cfbsolidC.c:585: warning: operation on `pdst' may be undefined
cfbsolidC.c:638: warning: operation on `pdst' may be undefined
cfbsolidC.c:656: warning: operation on `pdst' may be undefined
cfbsolidC.c:681: warning: operation on `pdst' may be undefined
cfbsolidC.c:870: warning: operation on `pdst' may be undefined
cfbsolidC.c:901: warning: operation on `pdst' may be undefined
cfbsolidC.c:948: warning: operation on `pdst' may be undefined
cfbsolidC.c:978: warning: operation on `pdst' may be undefined
cfbsolidC.c:980: warning: operation on `pdst' may be undefined
cfbsolidC.c:1010: warning: operation on `pdst' may be undefined
cfbsolidC.c:1011: warning: operation on `pdst' may be undefined
cfbsolidC.c:1037: warning: operation on `pdst' may be undefined
cfbsolidC.c:1038: warning: operation on `pdst' may be undefined
cfbsolidC.c:1062: warning: operation on `pdst' may be undefined
cfbsolidC.c:1110: warning: operation on `pdst' may be undefined
cfbsolidC.c:1140: warning: operation on `pdst' may be undefined
cfbsolidC.c:1164: warning: operation on `pdst' may be undefined
cfbsolidC.c:1216: warning: operation on `pdst' may be undefined
cfbsolidC.c:1234: warning: operation on `pdst' may be undefined
cfbsolidC.c:1259: warning: operation on `pdst' may be undefined
cfbsolidG.c:650: warning: operation on `pdst' may be undefined
cfbpntwin.c:265: warning: operation on `pdst' may be undefined
cfbpntwin.c:274: warning: operation on `pdst' may be undefined
cfbpntwin.c:293: warning: operation on `pdst' may be undefined
cfbpntwin.c:300: warning: operation on `pdst' may be undefined
cfbpntwin.c:302: warning: operation on `pdst' may be undefined
cfbpntwin.c:309: warning: operation on `pdst' may be undefined
cfbpntwin.c:310: warning: operation on `pdst' may be undefined
cfbpntwin.c:319: warning: operation on `pdst' may be undefined
cfbpntwin.c:324: warning: operation on `pdst' may be undefined
cfbpntwin.c:348: warning: operation on `pdst' may be undefined
cfbpntwin.c:353: warning: operation on `pdst' may be undefined
cfbpntwin.c:357: warning: operation on `pdst' may be undefined
cfbpntwin.c:515: warning: operation on `pdst' may be undefined
cfbpntwin.c:525: warning: operation on `pdst' may be undefined
cfbpntwin.c:546: warning: operation on `pdst' may be undefined
cfbpntwin.c:554: warning: operation on `pdst' may be undefined
cfbpntwin.c:556: warning: operation on `pdst' may be undefined
cfbpntwin.c:564: warning: operation on `pdst' may be undefined
cfbpntwin.c:565: warning: operation on `pdst' may be undefined
cfbpntwin.c:575: warning: operation on `pdst' may be undefined
cfbpntwin.c:580: warning: operation on `pdst' may be undefined
cfbpntwin.c:606: warning: operation on `pdst' may be undefined
cfbpntwin.c:611: warning: operation on `pdst' may be undefined
cfbpntwin.c:615: warning: operation on `pdst' may be undefined
cfbhrzvert.c:107: warning: operation on `addrl' may be undefined
cfbhrzvert.c:108: warning: operation on `addrl' may be undefined
cfbhrzvert.c:112: warning: operation on `addrl' may be undefined
cfbhrzvert.c:113: warning: operation on `addrl' may be undefined
cfbhrzvert.c:117: warning: operation on `addrl' may be undefined
cfbhrzvert.c:128: warning: operation on `addrl' may be undefined
cfbhrzvert.c:129: warning: operation on `addrl' may be undefined
cfbhrzvert.c:133: warning: operation on `addrl' may be undefined
cfbhrzvert.c:134: warning: operation on `addrl' may be undefined
cfbhrzvert.c:138: warning: operation on `addrl' may be undefined
cfbhrzvert.c:145: warning: operation on `addrl' may be undefined
cfbhrzvert.c:148: warning: operation on `addrl' may be undefined
cfbhrzvert.c:164: warning: operation on `addrl' may be undefined
cfbhrzvert.c:169: warning: operation on `addrl' may be undefined
cfbhrzvert.c:173: warning: operation on `addrl' may be undefined
cfbhrzvert.c:243: warning: operation on `addrl' may be undefined
cfbhrzvert.c:244: warning: operation on `addrl' may be undefined
cfbhrzvert.c:245: warning: operation on `addrl' may be undefined
cfbhrzvert.c:248: warning: operation on `addrl' may be undefined
cfbhrzvert.c:249: warning: operation on `addrl' may be undefined
cfbhrzvert.c:252: warning: operation on `addrl' may be undefined
cfbhrzvert.c:256: warning: operation on `addrl' may be undefined
cfbhrzvert.c:257: warning: operation on `addrl' may be undefined
cfbhrzvert.c:258: warning: operation on `addrl' may be undefined
cfbhrzvert.c:264: warning: operation on `addrl' may be undefined
cfbhrzvert.c:267: warning: operation on `addrl' may be undefined
cfbhrzvert.c:271: warning: operation on `addrl' may be undefined
cfbhrzvert.c:272: warning: operation on `addrl' may be undefined
cfb8segC.c:726: warning: operation on `addrp' may be undefined
cfb8segC.c:731: warning: operation on `addrp' may be undefined
cfb8segC.c:747: warning: operation on `addrp' may be undefined
cfb8segC.c:752: warning: operation on `addrp' may be undefined
cfb8segC.c:766: warning: operation on `addrp' may be undefined
cfb8segC.c:797: warning: operation on `addrp' may be undefined
cfb8segC.c:802: warning: operation on `addrp' may be undefined
cfb8segC.c:806: warning: operation on `addrp' may be undefined

I count 127 other messages.

Here is a patch which fixes some of the messages.

*** ./Xvnc/lib/font/Speedo/set_trns.c.old	2002-11-06 10:15:56.000000000 +0000
--- ./Xvnc/lib/font/Speedo/set_trns.c	2002-11-06 10:16:26.000000000 +0000
***************
*** 133,140 ****
  intsize[7] = 0;
  intsize[8] = 0;
  
! n = ((format & BIT6)? (fix15)NEXT_BYTE(pointer): 0) +
!     ((format & BIT7)? (fix15)NEXT_BYTE(pointer): 0);
  for (i = 0; i < n; i++)          /* For each entry in int table ... */
      {
      format = NEXT_BYTE(pointer); /* Read format byte */
--- 133,140 ----
  intsize[7] = 0;
  intsize[8] = 0;
  
! n = ((format & BIT6)? (fix15)NEXT_BYTE(pointer): 0);
! n += ((format & BIT7)? (fix15)NEXT_BYTE(pointer): 0);
  for (i = 0; i < n; i++)          /* For each entry in int table ... */
      {
      format = NEXT_BYTE(pointer); /* Read format byte */
*** ./Xvnc/lib/font/Type1/token.c.old	2002-11-06 10:17:25.000000000 +0000
--- ./Xvnc/lib/font/Type1/token.c	2002-11-06 10:17:46.000000000 +0000
***************
*** 105,111 ****
    if (exponent < 0) {
      power = 0.1;
      value = (exponent & 1 ? power : 1.0);
!     exponent = -(++exponent >> 1); /* portable C for -(exponent/2) */
    }
    else {
      power = 10.0;
--- 105,111 ----
    if (exponent < 0) {
      power = 0.1;
      value = (exponent & 1 ? power : 1.0);
!     exponent = -((exponent + 1) >> 1); /* portable C for -(exponent/2) */
    }
    else {
      power = 10.0;
*** ./Xvnc/programs/Xserver/cfb24/cfbsolidC.c.old	2002-11-06 10:39:11.000000000 +0000
--- ./Xvnc/programs/Xserver/cfb24/cfbsolidC.c	2002-11-06 10:55:23.000000000 +0000
***************
*** 213,219 ****
  	    case 1:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000);
  		    *pdst++ = piQxelXor[1];
  		    *pdst-- = piQxelXor[2];
  #endif
--- 213,219 ----
  	    case 1:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); pdst++;
  		    *pdst++ = piQxelXor[1];
  		    *pdst-- = piQxelXor[2];
  #endif
***************
*** 247,253 ****
  	    case 2:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000);
  		    *pdst-- = piQxelXor[2];
  #endif
  #if RROP == GXxor
--- 247,253 ----
  	    case 2:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); pdst++;
  		    *pdst-- = piQxelXor[2];
  #endif
  #if RROP == GXxor
***************
*** 300,306 ****
  #if RROP == GXcopy
  		    *pdst++ = piQxelXor[0];
  		    *pdst++ = piQxelXor[1];
! 		    *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF);
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= piQxelXor[0];
--- 300,306 ----
  #if RROP == GXcopy
  		    *pdst++ = piQxelXor[0];
  		    *pdst++ = piQxelXor[1];
! 		    *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); --pdst;
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= piQxelXor[0];
***************
*** 332,340 ****
  	    case 1:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000);
  		    *pdst++ = piQxelXor[1];
! 		    *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF);
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= (piQxelXor[0] & 0xFF000000);
--- 332,340 ----
  	    case 1:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); pdst++;
  		    *pdst++ = piQxelXor[1];
! 		    *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); --pdst;
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= (piQxelXor[0] & 0xFF000000);
***************
*** 366,373 ****
  	    case 2:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000);
! 		    *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF);
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= (piQxelXor[1] & 0xFFFF0000);
--- 366,373 ----
  	    case 2:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); pdst++;
! 		    *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); --pdst;
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= (piQxelXor[1] & 0xFFFF0000);
***************
*** 417,424 ****
  	    case 2:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000);
! 		    *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF);
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= (piQxelXor[1] & 0xFFFF0000);
--- 417,424 ----
  	    case 2:
  		while(h--){
  #if RROP == GXcopy
! 		    *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); ++pdst;
! 		    *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); --pdst;
  #endif
  #if RROP == GXxor
  		    *pdst++ ^= (piQxelXor[1] & 0xFFFF0000);
*** ./Xvnc/programs/Xserver/cfb/cfbteblt8.c.old	2002-11-06 10:34:41.000000000 +0000
--- ./Xvnc/programs/Xserver/cfb/cfbteblt8.c	2002-11-06 10:35:14.000000000 +0000
***************
*** 300,306 ****
  #define StorePixels(o,p)    dst[o] = p
  #define Loop		    dst += widthDst;
  #else
! #define StorePixels(o,p)    *dst++ = (p)
  #define Loop		    dst += widthLeft;
  #endif
  
--- 300,306 ----
  #define StorePixels(o,p)    dst[o] = p
  #define Loop		    dst += widthDst;
  #else
! #define StorePixels(o,p)    (*dst = (p)), dst++
  #define Loop		    dst += widthLeft;
  #endif
  


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:
Comment 1 Tim Waugh 2002-12-23 07:15:18 EST
These are all in the X skeleton rather than the VNC-specific code.  Thanks anyway.
Comment 2 Tim Waugh 2003-08-08 10:01:51 EDT
These are all in X code, and VNC is based on 4.3.0 now.

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