summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-10-19 11:49:31 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-10-19 11:49:31 -0200
commitd6204ecac290f2f78ca0c8142a59e7e734513d58 (patch)
tree4b54fc13ebf155bdac10b6029597b2b0666726f8 /mysys
parent1c68d2efe72b8663fb3cfba91667179d142e81be (diff)
downloadmariadb-git-d6204ecac290f2f78ca0c8142a59e7e734513d58.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix assorted compiler warnings on Mac OS X.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_gethostbyname.c6
-rw-r--r--mysys/my_sync.c32
2 files changed, 30 insertions, 8 deletions
diff --git a/mysys/my_gethostbyname.c b/mysys/my_gethostbyname.c
index 067fdfee9db..12cf90271dd 100644
--- a/mysys/my_gethostbyname.c
+++ b/mysys/my_gethostbyname.c
@@ -92,8 +92,10 @@ extern pthread_mutex_t LOCK_gethostbyname_r;
*/
struct hostent *my_gethostbyname_r(const char *name,
- struct hostent *result, char *buffer,
- int buflen, int *h_errnop)
+ struct hostent *res __attribute__((unused)),
+ char *buffer __attribute__((unused)),
+ int buflen __attribute__((unused)),
+ int *h_errnop)
{
struct hostent *hp;
pthread_mutex_lock(&LOCK_gethostbyname_r);
diff --git a/mysys/my_sync.c b/mysys/my_sync.c
index 97540f5eb48..d6ca4f1c1df 100644
--- a/mysys/my_sync.c
+++ b/mysys/my_sync.c
@@ -89,6 +89,8 @@ int my_sync(File fd, myf my_flags)
static const char cur_dir_name[]= {FN_CURLIB, 0};
+
+
/*
Force directory information to disk.
@@ -100,9 +102,11 @@ static const char cur_dir_name[]= {FN_CURLIB, 0};
RETURN
0 if ok, !=0 if error
*/
+
+#ifdef NEED_EXPLICIT_SYNC_DIR
+
int my_sync_dir(const char *dir_name, myf my_flags)
{
-#ifdef NEED_EXPLICIT_SYNC_DIR
File dir_fd;
int res= 0;
const char *correct_dir_name;
@@ -124,11 +128,18 @@ int my_sync_dir(const char *dir_name, myf my_flags)
else
res= 1;
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;
-#endif
}
+#endif /* NEED_EXPLICIT_SYNC_DIR */
+
/*
Force directory information to disk.
@@ -141,15 +152,24 @@ int my_sync_dir(const char *dir_name, myf my_flags)
RETURN
0 if ok, !=0 if error
*/
+
+#ifdef NEED_EXPLICIT_SYNC_DIR
+
int my_sync_dir_by_file(const char *file_name, myf my_flags)
{
-#ifdef NEED_EXPLICIT_SYNC_DIR
char dir_name[FN_REFLEN];
size_t dir_name_length;
dirname_part(dir_name, file_name, &dir_name_length);
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;
-#endif
}
+#endif /* NEED_EXPLICIT_SYNC_DIR */
+