Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d6204eca
Commit
d6204eca
authored
Oct 19, 2010
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix assorted compiler warnings on Mac OS X.
parent
1c68d2ef
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
13 deletions
+35
-13
BUILD/SETUP.sh
BUILD/SETUP.sh
+1
-1
cmd-line-utils/readline/terminal.c
cmd-line-utils/readline/terminal.c
+4
-4
mysys/my_gethostbyname.c
mysys/my_gethostbyname.c
+4
-2
mysys/my_sync.c
mysys/my_sync.c
+26
-6
No files found.
BUILD/SETUP.sh
View file @
d6204eca
...
@@ -100,7 +100,7 @@ if [ "x$warning_mode" != "xpedantic" ]; then
...
@@ -100,7 +100,7 @@ if [ "x$warning_mode" != "xpedantic" ]; then
# C++ warnings
# C++ warnings
cxx_warnings
=
"
$warnings
-Wno-unused-parameter"
cxx_warnings
=
"
$warnings
-Wno-unused-parameter"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings
=
"
$cxx_warnings
-W
ctor-dtor-privacy -W
non-virtual-dtor"
cxx_warnings
=
"
$cxx_warnings
-Wnon-virtual-dtor"
# Added unless --with-debug=full
# Added unless --with-debug=full
debug_extra_cflags
=
"-O0 -g3 -gdwarf-2"
debug_extra_cflags
=
"-O0 -g3 -gdwarf-2"
else
else
...
...
cmd-line-utils/readline/terminal.c
View file @
d6204eca
...
@@ -268,7 +268,7 @@ _rl_get_screen_size (tty, ignore_env)
...
@@ -268,7 +268,7 @@ _rl_get_screen_size (tty, ignore_env)
#if !defined (__DJGPP__)
#if !defined (__DJGPP__)
if
(
_rl_screenwidth
<=
0
&&
term_string_buffer
)
if
(
_rl_screenwidth
<=
0
&&
term_string_buffer
)
_rl_screenwidth
=
tgetnum
(
"co"
);
_rl_screenwidth
=
tgetnum
(
(
char
*
)
"co"
);
#endif
#endif
}
}
...
@@ -284,7 +284,7 @@ _rl_get_screen_size (tty, ignore_env)
...
@@ -284,7 +284,7 @@ _rl_get_screen_size (tty, ignore_env)
#if !defined (__DJGPP__)
#if !defined (__DJGPP__)
if
(
_rl_screenheight
<=
0
&&
term_string_buffer
)
if
(
_rl_screenheight
<=
0
&&
term_string_buffer
)
_rl_screenheight
=
tgetnum
(
"li"
);
_rl_screenheight
=
tgetnum
(
(
char
*
)
"li"
);
#endif
#endif
}
}
...
@@ -516,7 +516,7 @@ _rl_init_terminal_io (terminal_name)
...
@@ -516,7 +516,7 @@ _rl_init_terminal_io (terminal_name)
if
(
!
_rl_term_cr
)
if
(
!
_rl_term_cr
)
_rl_term_cr
=
"
\r
"
;
_rl_term_cr
=
"
\r
"
;
_rl_term_autowrap
=
tgetflag
(
"am"
)
&&
tgetflag
(
"xn"
);
_rl_term_autowrap
=
tgetflag
(
(
char
*
)
"am"
)
&&
tgetflag
((
char
*
)
"xn"
);
/* Allow calling application to set default height and width, using
/* Allow calling application to set default height and width, using
rl_set_screen_size */
rl_set_screen_size */
...
@@ -531,7 +531,7 @@ _rl_init_terminal_io (terminal_name)
...
@@ -531,7 +531,7 @@ _rl_init_terminal_io (terminal_name)
/* Check to see if this terminal has a meta key and clear the capability
/* Check to see if this terminal has a meta key and clear the capability
variables if there is none. */
variables if there is none. */
term_has_meta
=
(
tgetflag
(
"km"
)
||
tgetflag
(
"MT"
));
term_has_meta
=
(
tgetflag
(
(
char
*
)
"km"
)
||
tgetflag
((
char
*
)
"MT"
));
if
(
!
term_has_meta
)
if
(
!
term_has_meta
)
_rl_term_mm
=
_rl_term_mo
=
(
char
*
)
NULL
;
_rl_term_mm
=
_rl_term_mo
=
(
char
*
)
NULL
;
...
...
mysys/my_gethostbyname.c
View file @
d6204eca
...
@@ -92,8 +92,10 @@ extern pthread_mutex_t LOCK_gethostbyname_r;
...
@@ -92,8 +92,10 @@ extern pthread_mutex_t LOCK_gethostbyname_r;
*/
*/
struct
hostent
*
my_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
my_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
result
,
char
*
buffer
,
struct
hostent
*
res
__attribute__
((
unused
)),
int
buflen
,
int
*
h_errnop
)
char
*
buffer
__attribute__
((
unused
)),
int
buflen
__attribute__
((
unused
)),
int
*
h_errnop
)
{
{
struct
hostent
*
hp
;
struct
hostent
*
hp
;
pthread_mutex_lock
(
&
LOCK_gethostbyname_r
);
pthread_mutex_lock
(
&
LOCK_gethostbyname_r
);
...
...
mysys/my_sync.c
View file @
d6204eca
...
@@ -89,6 +89,8 @@ int my_sync(File fd, myf my_flags)
...
@@ -89,6 +89,8 @@ int my_sync(File fd, myf my_flags)
static
const
char
cur_dir_name
[]
=
{
FN_CURLIB
,
0
};
static
const
char
cur_dir_name
[]
=
{
FN_CURLIB
,
0
};
/*
/*
Force directory information to disk.
Force directory information to disk.
...
@@ -100,9 +102,11 @@ static const char cur_dir_name[]= {FN_CURLIB, 0};
...
@@ -100,9 +102,11 @@ static const char cur_dir_name[]= {FN_CURLIB, 0};
RETURN
RETURN
0 if ok, !=0 if error
0 if ok, !=0 if error
*/
*/
#ifdef NEED_EXPLICIT_SYNC_DIR
int
my_sync_dir
(
const
char
*
dir_name
,
myf
my_flags
)
int
my_sync_dir
(
const
char
*
dir_name
,
myf
my_flags
)
{
{
#ifdef NEED_EXPLICIT_SYNC_DIR
File
dir_fd
;
File
dir_fd
;
int
res
=
0
;
int
res
=
0
;
const
char
*
correct_dir_name
;
const
char
*
correct_dir_name
;
...
@@ -124,11 +128,18 @@ int my_sync_dir(const char *dir_name, myf my_flags)
...
@@ -124,11 +128,18 @@ int my_sync_dir(const char *dir_name, myf my_flags)
else
else
res
=
1
;
res
=
1
;
DBUG_RETURN
(
res
);
DBUG_RETURN
(
res
);
#else
}
#else
/* NEED_EXPLICIT_SYNC_DIR */
int
my_sync_dir
(
const
char
*
dir_name
__attribute__
((
unused
)),
myf
my_flags
__attribute__
((
unused
)))
{
return
0
;
return
0
;
#endif
}
}
#endif
/* NEED_EXPLICIT_SYNC_DIR */
/*
/*
Force directory information to disk.
Force directory information to disk.
...
@@ -141,15 +152,24 @@ int my_sync_dir(const char *dir_name, myf my_flags)
...
@@ -141,15 +152,24 @@ int my_sync_dir(const char *dir_name, myf my_flags)
RETURN
RETURN
0 if ok, !=0 if error
0 if ok, !=0 if error
*/
*/
#ifdef NEED_EXPLICIT_SYNC_DIR
int
my_sync_dir_by_file
(
const
char
*
file_name
,
myf
my_flags
)
int
my_sync_dir_by_file
(
const
char
*
file_name
,
myf
my_flags
)
{
{
#ifdef NEED_EXPLICIT_SYNC_DIR
char
dir_name
[
FN_REFLEN
];
char
dir_name
[
FN_REFLEN
];
size_t
dir_name_length
;
size_t
dir_name_length
;
dirname_part
(
dir_name
,
file_name
,
&
dir_name_length
);
dirname_part
(
dir_name
,
file_name
,
&
dir_name_length
);
return
my_sync_dir
(
dir_name
,
my_flags
);
return
my_sync_dir
(
dir_name
,
my_flags
);
#else
}
#else
/* NEED_EXPLICIT_SYNC_DIR */
int
my_sync_dir_by_file
(
const
char
*
file_name
__attribute__
((
unused
)),
myf
my_flags
__attribute__
((
unused
)))
{
return
0
;
return
0
;
#endif
}
}
#endif
/* NEED_EXPLICIT_SYNC_DIR */
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