Skip site navigation (1) Skip section navigation (2)

Bug Report - Compile errors in vacuum.c and shmem.c

From: "Billy G(dot) Allie" <Bill(dot)Allie(at)mug(dot)org>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: patches(at)postgreSQL(dot)org, pgsql-ports(at)postgreSQL(dot)org
Subject: Bug Report - Compile errors in vacuum.c and shmem.c
Date: 1999-03-31 08:06:41
Message-ID: 199903310806.DAA19034@bajor.mug.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name		:	Billy G. Allie
Your email address	:	Bill(dot)Allie(at)mug(dot)org


System Configuration
---------------------
  Architecture (example: Intel Pentium)  	: Pentium

  Operating System (example: Linux 2.0.26 ELF) 	: UnixWare 7.0.1

  PostgreSQL version (example: PostgreSQL-6.4)  : Current CVS version

  Compiler used (example:  gcc 2.8.0)		: Optimizing C Compilation
						  System  (CCS) 3.2  08/18/98
						  (u701)


Please enter a FULL description of your problem:
------------------------------------------------
Compiling 'vacuum.c' produces the following errors:

    UX:acomp: ERROR: "vacuum.c", line 2424: cannot do pointer arithmetic on
    operand of unknown size
    UX:acomp: ERROR: "vacuum.c", line 2428: cannot do pointer arithmetic on
    operand of unknown size
    UX:acomp: ERROR: "vacuum.c", line 2431: cannot do pointer arithmetic on
    operand of unknown size
    UX:acomp: ERROR: "vacuum.c", line 2433: cannot do pointer arithmetic on
    operand of unknown size
    UX:acomp: ERROR: "vacuum.c", line 2448: cannot do pointer arithmetic on
    operand of unknown size

Compiling 'shmem.c' produces the following error:

    UX:acomp: ERROR: "shmem.c", line 740: void function cannot return value


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible: 
----------------------------------------------------------------------
Compile the program on a strict ANSI C compiler :-)


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
The attached patch will fix the problems.

In vacuumc.c, pointer arithmatic was performed on a pointer of type void.  The 
patch casts the void pointer to a character pointer, does the arithmatic, and 
then casts the result back to a void pointer.

In shmem.c, a function of type void returned a value.  The patch removes the 
offending return statement.

pgsql-ports by date

Next:From: Unprivileged userDate: 1999-03-31 08:28:40
Subject: Port Bug Report: Strange choice of index, or no choice of index, for numeric keys
Previous:From: Andrew MerrillDate: 1999-03-30 18:50:50
Subject: built 6.4.2 on SCO OpenServer 5.0.5

pgsql-hackers by date

Next:From: Michael ReifenbergerDate: 1999-03-31 09:37:08
Subject: Problem with complexer join still persists sometimes
Previous:From: Roland RobertsDate: 1999-03-31 03:55:10
Subject: Re: [HACKERS] Removing derived files from CVS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group