Skip to content

Commit

Permalink
MDEV-8379 - SUSE mariadb patches
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sergey Vojtovich committed Oct 1, 2015
1 parent fea1568 commit 727da9c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions include/my_dbug.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern void _db_end_(void);
extern void _db_lock_file_(void);
extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void);
extern void _db_flush_();
extern void _db_flush_(void);
extern void dbug_swap_code_state(void **code_state_store);
extern void dbug_free_code_state(void **code_state_store);
extern const char* _db_get_func_(void);
Expand Down Expand Up @@ -123,7 +123,7 @@ extern const char* _db_get_func_(void);
#ifdef __WIN__
#define DBUG_SUICIDE() DBUG_ABORT()
#else
extern void _db_suicide_();
extern void _db_suicide_(void);
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
#endif

Expand Down
2 changes: 1 addition & 1 deletion include/my_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ typedef int my_socket; /* File descriptor for sockets */
/* Type for fuctions that handles signals */
#define sig_handler RETSIGTYPE
C_MODE_START
typedef void (*sig_return)();/* Returns type from signal */
typedef void (*sig_return)(void); /* Returns type from signal */
C_MODE_END
#if defined(__GNUC__) && !defined(_lint)
typedef char pchar; /* Mixed prototypes can take char */
Expand Down
8 changes: 4 additions & 4 deletions include/my_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ extern void my_thread_end(void);
extern const char *my_thread_name(void);
extern my_thread_id my_thread_dbug_id(void);
extern int pthread_dummy(int);
extern void my_mutex_init();
extern void my_mutex_end();
extern void my_mutex_init(void);
extern void my_mutex_end(void);

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

Expand Down Expand Up @@ -745,8 +745,8 @@ struct st_my_thread_var
};

extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
extern void **my_thread_var_dbug();
extern safe_mutex_t **my_thread_var_mutex_in_use();
extern void **my_thread_var_dbug(void);
extern safe_mutex_t **my_thread_var_mutex_in_use(void);
extern uint my_thread_end_wait_time;
extern my_bool safe_mutex_deadlock_detector;
#define my_thread_var (_my_thread_var())
Expand Down
12 changes: 6 additions & 6 deletions include/my_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ extern void my_osmaperr(unsigned long last_error);
#endif

extern void init_glob_errs(void);
extern const char** get_global_errmsgs();
extern const char** get_global_errmsgs(void);
extern void wait_for_free_space(const char *filename, int errors);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
Expand All @@ -667,7 +667,7 @@ extern void my_printf_error(uint my_err, const char *format,
ATTRIBUTE_FORMAT(printf, 2, 4);
extern void my_printv_error(uint error, const char *format, myf MyFlags,
va_list ap);
extern int my_error_register(const char** (*get_errmsgs) (),
extern int my_error_register(const char** (*get_errmsgs) (void),
uint first, uint last);
extern const char **my_error_unregister(uint first, uint last);
extern void my_message(uint my_err, const char *str,myf MyFlags);
Expand Down Expand Up @@ -885,12 +885,12 @@ extern uint my_set_max_open_files(uint files);
void my_free_open_file_info(void);

extern my_bool my_gethwaddr(uchar *to);
extern int my_getncpus();
extern int my_getncpus(void);

#define HRTIME_RESOLUTION 1000000ULL /* microseconds */
typedef struct {ulonglong val;} my_hrtime_t;
void my_time_init();
extern my_hrtime_t my_hrtime();
void my_time_init(void);
extern my_hrtime_t my_hrtime(void);
extern ulonglong my_interval_timer(void);
extern ulonglong my_getcputime(void);

Expand Down Expand Up @@ -949,7 +949,7 @@ int my_msync(int, void *, size_t, int);
void my_uuid_init(ulong seed1, ulong seed2);
void my_uuid(uchar *guid);
void my_uuid2str(const uchar *guid, char *s);
void my_uuid_end();
void my_uuid_end(void);

/* character sets */
extern void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader);
Expand Down

0 comments on commit 727da9c

Please sign in to comment.