Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6216e84d
Commit
6216e84d
authored
Apr 18, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ECPGraise's str parameter const to suppress warnings from gcc
and errors from pickier compilers.
parent
3b192c23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/include/ecpglib.h
+1
-1
src/interfaces/ecpg/lib/error.c
src/interfaces/ecpg/lib/error.c
+7
-5
No files found.
src/interfaces/ecpg/include/ecpglib.h
View file @
6216e84d
...
...
@@ -34,7 +34,7 @@ extern "C"
const
char
*
descriptor
,
const
char
*
query
);
bool
ECPGdeallocate_desc
(
int
line
,
const
char
*
name
);
bool
ECPGallocate_desc
(
int
line
,
const
char
*
name
);
void
ECPGraise
(
int
line
,
int
code
,
char
*
str
);
void
ECPGraise
(
int
line
,
int
code
,
c
onst
c
har
*
str
);
bool
ECPGget_desc_header
(
int
,
char
*
,
int
*
);
bool
ECPGget_desc
(
int
,
char
*
,
int
,...);
...
...
src/interfaces/ecpg/lib/error.c
View file @
6216e84d
...
...
@@ -7,7 +7,7 @@
#include <sqlca.h>
void
ECPGraise
(
int
line
,
int
code
,
char
*
str
)
ECPGraise
(
int
line
,
int
code
,
c
onst
c
har
*
str
)
{
sqlca
.
sqlcode
=
code
;
...
...
@@ -119,13 +119,15 @@ ECPGraise(int line, int code, char *str)
break
;
case
ECPG_PGSQL
:
{
int
slen
=
strlen
(
str
);
/* strip trailing newline */
if
(
str
[
strlen
(
str
)
-
1
]
==
'\n'
)
str
[
strlen
(
str
)
-
1
]
=
'\0'
;
if
(
slen
>
0
&&
str
[
slen
-
1
]
==
'\n'
)
slen
--
;
snprintf
(
sqlca
.
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
.
sqlerrm
.
sqlerrmc
),
"'%
s' in line %d."
,
str
,
line
);
"'%
.*s' in line %d."
,
slen
,
str
,
line
);
break
;
}
case
ECPG_TRANS
:
snprintf
(
sqlca
.
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
.
sqlerrm
.
sqlerrmc
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment