Skip to content

Commit 727da9c

Browse files
committed
MDEV-8379 - SUSE mariadb patches
Fixed unclean prototype declaration. According to ISO/IEC 9899:TC2: ... 10. The special case of an unnamed parameter of type void as the only item in the list specifies that the function has no parameters. ... 14. An identifier list declares only the identifiers of the parameters of the function. An empty list in a function declarator that is part of a definition of that function specifies that the function has no parameters. The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied. 124) ... 6.11.6 Function declarators The use of function declarators with empty parentheses (not prototype-format parameter type declarators) is an obsolescent feature. ... Patch contributed by Michal Hrusecky.
1 parent fea1568 commit 727da9c

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

include/my_dbug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extern void _db_end_(void);
5858
extern void _db_lock_file_(void);
5959
extern void _db_unlock_file_(void);
6060
extern FILE *_db_fp_(void);
61-
extern void _db_flush_();
61+
extern void _db_flush_(void);
6262
extern void dbug_swap_code_state(void **code_state_store);
6363
extern void dbug_free_code_state(void **code_state_store);
6464
extern const char* _db_get_func_(void);
@@ -123,7 +123,7 @@ extern const char* _db_get_func_(void);
123123
#ifdef __WIN__
124124
#define DBUG_SUICIDE() DBUG_ABORT()
125125
#else
126-
extern void _db_suicide_();
126+
extern void _db_suicide_(void);
127127
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
128128
#endif
129129

include/my_global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ typedef int my_socket; /* File descriptor for sockets */
555555
/* Type for fuctions that handles signals */
556556
#define sig_handler RETSIGTYPE
557557
C_MODE_START
558-
typedef void (*sig_return)();/* Returns type from signal */
558+
typedef void (*sig_return)(void); /* Returns type from signal */
559559
C_MODE_END
560560
#if defined(__GNUC__) && !defined(_lint)
561561
typedef char pchar; /* Mixed prototypes can take char */

include/my_pthread.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ extern void my_thread_end(void);
701701
extern const char *my_thread_name(void);
702702
extern my_thread_id my_thread_dbug_id(void);
703703
extern int pthread_dummy(int);
704-
extern void my_mutex_init();
705-
extern void my_mutex_end();
704+
extern void my_mutex_init(void);
705+
extern void my_mutex_end(void);
706706

707707
/* All thread specific variables are in the following struct */
708708

@@ -745,8 +745,8 @@ struct st_my_thread_var
745745
};
746746

747747
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
748-
extern void **my_thread_var_dbug();
749-
extern safe_mutex_t **my_thread_var_mutex_in_use();
748+
extern void **my_thread_var_dbug(void);
749+
extern safe_mutex_t **my_thread_var_mutex_in_use(void);
750750
extern uint my_thread_end_wait_time;
751751
extern my_bool safe_mutex_deadlock_detector;
752752
#define my_thread_var (_my_thread_var())

include/my_sys.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ extern void my_osmaperr(unsigned long last_error);
642642
#endif
643643

644644
extern void init_glob_errs(void);
645-
extern const char** get_global_errmsgs();
645+
extern const char** get_global_errmsgs(void);
646646
extern void wait_for_free_space(const char *filename, int errors);
647647
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
648648
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
@@ -667,7 +667,7 @@ extern void my_printf_error(uint my_err, const char *format,
667667
ATTRIBUTE_FORMAT(printf, 2, 4);
668668
extern void my_printv_error(uint error, const char *format, myf MyFlags,
669669
va_list ap);
670-
extern int my_error_register(const char** (*get_errmsgs) (),
670+
extern int my_error_register(const char** (*get_errmsgs) (void),
671671
uint first, uint last);
672672
extern const char **my_error_unregister(uint first, uint last);
673673
extern void my_message(uint my_err, const char *str,myf MyFlags);
@@ -885,12 +885,12 @@ extern uint my_set_max_open_files(uint files);
885885
void my_free_open_file_info(void);
886886

887887
extern my_bool my_gethwaddr(uchar *to);
888-
extern int my_getncpus();
888+
extern int my_getncpus(void);
889889

890890
#define HRTIME_RESOLUTION 1000000ULL /* microseconds */
891891
typedef struct {ulonglong val;} my_hrtime_t;
892-
void my_time_init();
893-
extern my_hrtime_t my_hrtime();
892+
void my_time_init(void);
893+
extern my_hrtime_t my_hrtime(void);
894894
extern ulonglong my_interval_timer(void);
895895
extern ulonglong my_getcputime(void);
896896

@@ -949,7 +949,7 @@ int my_msync(int, void *, size_t, int);
949949
void my_uuid_init(ulong seed1, ulong seed2);
950950
void my_uuid(uchar *guid);
951951
void my_uuid2str(const uchar *guid, char *s);
952-
void my_uuid_end();
952+
void my_uuid_end(void);
953953

954954
/* character sets */
955955
extern void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader);

0 commit comments

Comments
 (0)