Project

General

Profile

Feature #4849

Fix compiler errors/warnings

Added by bford - almost 19 years ago. Updated almost 19 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
bford -
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
fixed

Description

Resolve ALL errors and warnings during compilation. Below is an example from FC4 output:

Src/tchar.h:2025:1: warning: this is the location of the previous definition
Src/common.c: In function 'GetSQLString':
Src/common.c:85: warning: pointer targets in passing argument 1 of 'strlen' diff er in signedness
Src/common.c:92: warning: pointer targets in passing argument 2 of '+builtin_st rncpy' differ in signedness
Src/common.c:106: warning: pointer targets in return differ in signedness
Src/common.c: In function 'ReadFromDS':
Src/common.c:123: warning: pointer targets in assignment differ in signedness
Src/common.c:126: warning: pointer targets in passing argument 2 of '+builtin_s trncpy' differ in signedness
Src/common.c: In function 'ReturnString':
Src/common.c:589: warning: pointer targets in assignment differ in signedness
Src/common.c:592: warning: pointer targets in passing argument 1 of 'strlen' dif fer in signedness
Src/common.c:606: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:606: warning: pointer targets in passing argument 2 of '+builtin_s trncpy' differ in signedness
Src/common.c: In function 'PrepareConnectionStringRequest':
Src/common.c:667: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:677: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:683: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c: In function 'PrepareConnectionString':
Src/common.c:708: warning: pointer targets in passing argument 1 of 'strlen' dif fer in signedness
Src/common.c:741: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:746: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:751: warning: pointer targets in passing argument 1 of 'strlen' dif fer in signedness
Src/common.c:751: warning: pointer targets in passing argument 1 of 'strlen' dif fer in signedness
Src/common.c:752: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:752: warning: pointer targets in passing argument 2 of '+builtin_s trncpy' differ in signedness
Src/common.c:771: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c:781: warning: pointer targets in passing argument 1 of '+builtin_s trncpy' differ in signedness
Src/common.c: In function 'PostgreTypeConverter':
Src/common.c:955: warning: pointer targets in passing argument 1 of 'strlen' dif fer in signedness
Src/common.c:958: warning: pointer targets in passing argument 1 of 'strlen' dif fer in signedness
Src/common.c:958: warning: pointer targets in passing argument 1 of 'strlen' dif 
#1

Updated by anonymous - almost 19 years ago

Removed compilation warnings (gcc versiob 3.4.4) with default compilation flags. Still some warning with -Wall.
Changeset r11

#2

Updated by anonymous - almost 19 years ago

99% of warnings I get with -Wall - becouse SQLTCHAR type defined as unsigned char, and str*** functions use char type. So 99% of fixed will be just typecasting SQLTCHAR to/from char. Have we to do it ?

#3

Updated by Álvaro Herrera almost 19 years ago

Maybe it would be easier to create macros that encapsulate strlen, strcpy etc with the needed typecasts, so that the casts need not be disseminated all over the code. However I see that tchar.h already is quite a mess of #define, which may make the whole thing a little more complicated. Is tchar.h really needed?

#4

Updated by anonymous - almost 19 years ago

ok, we will remove tchar and make small sqlstr.c with remapping standart string functions to SQLTCHAR compatible

#5

Updated by anonymous - almost 19 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Appears to resolved in r16

Also available in: Atom PDF