Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
84631952
Commit
84631952
authored
10 years ago
by
Noah Misch
Browse files
Options
Downloads
Patches
Plain Diff
Fix win32setlocale.c const-related warnings.
Back-patch to 9.2, like commit
db29620d
.
parent
9522efda
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/port/win32setlocale.c
+8
-4
8 additions, 4 deletions
src/port/win32setlocale.c
with
8 additions
and
4 deletions
src/port/win32setlocale.c
+
8
−
4
View file @
84631952
...
@@ -103,8 +103,8 @@ static const struct locale_map locale_map_result[] = {
...
@@ -103,8 +103,8 @@ static const struct locale_map locale_map_result[] = {
#define MAX_LOCALE_NAME_LEN 100
#define MAX_LOCALE_NAME_LEN 100
static
char
*
static
const
char
*
map_locale
(
struct
locale_map
*
map
,
char
*
locale
)
map_locale
(
const
struct
locale_map
*
map
,
const
char
*
locale
)
{
{
static
char
aliasbuf
[
MAX_LOCALE_NAME_LEN
];
static
char
aliasbuf
[
MAX_LOCALE_NAME_LEN
];
int
i
;
int
i
;
...
@@ -167,7 +167,7 @@ map_locale(struct locale_map *map, char *locale)
...
@@ -167,7 +167,7 @@ map_locale(struct locale_map *map, char *locale)
char
*
char
*
pgwin32_setlocale
(
int
category
,
const
char
*
locale
)
pgwin32_setlocale
(
int
category
,
const
char
*
locale
)
{
{
char
*
argument
;
c
onst
c
har
*
argument
;
char
*
result
;
char
*
result
;
if
(
locale
==
NULL
)
if
(
locale
==
NULL
)
...
@@ -178,8 +178,12 @@ pgwin32_setlocale(int category, const char *locale)
...
@@ -178,8 +178,12 @@ pgwin32_setlocale(int category, const char *locale)
/* Call the real setlocale() function */
/* Call the real setlocale() function */
result
=
setlocale
(
category
,
argument
);
result
=
setlocale
(
category
,
argument
);
/*
* setlocale() is specified to return a "char *" that the caller is
* forbidden to modify, so casting away the "const" is innocuous.
*/
if
(
result
)
if
(
result
)
result
=
map_locale
(
locale_map_result
,
result
);
result
=
(
char
*
)
map_locale
(
locale_map_result
,
result
);
return
result
;
return
result
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment