diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 719b698f7..e5073aa0f 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-02-15, Fix warnings for uuid. v4.0.245 * v4.0, 2022-02-15, Merge [#2917](https://github.com/ossrs/srs/pull/2917): SRT: Close connection if RTMP failed. (#2917). v4.0.244 * v4.0, 2022-02-15, Refine build script for SRT to avoid warnings. v4.0.243 * v4.0, 2022-02-11, Support new fields for feature query. v4.0.241 diff --git a/trunk/src/app/srs_app_uuid.cpp b/trunk/src/app/srs_app_uuid.cpp index 721efbf7b..673ed6b1c 100644 --- a/trunk/src/app/srs_app_uuid.cpp +++ b/trunk/src/app/srs_app_uuid.cpp @@ -148,6 +148,7 @@ (type *)( (char *)__mptr - offsetof(type,member) );}) #endif +#if 0 #ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME # ifdef HAVE___PROGNAME extern char *__progname; @@ -181,9 +182,10 @@ prog_inv_sh_nm_from_file(char *f, char stripext) } # endif #endif - +#endif #ifndef HAVE_ERR_H +#if 0 static inline void errmsg(char doexit, int excode, char adderr, const char *fmt, ...) { @@ -202,6 +204,7 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...) if (doexit) exit(excode); } +#endif #ifndef HAVE_ERR # define err(E, FMT...) errmsg(1, E, 1, FMT) @@ -221,10 +224,12 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...) #endif /* !HAVE_ERR_H */ +#if 0 static inline __attribute__((const)) int is_power_of_2(unsigned long num) { return (num != 0 && ((num & (num - 1)) == 0)); } +#endif #ifndef HAVE_LOFF_T typedef int64_t loff_t; @@ -263,6 +268,7 @@ static inline int dirfd(DIR *d) #define IUTF8 0040000 #endif +#if 0 /* * MAXHOSTNAMELEN replacement */ @@ -282,6 +288,7 @@ static inline size_t get_hostname_max(void) #endif return 64; } +#endif #ifndef HAVE_USLEEP /* @@ -825,7 +832,7 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, rewind(state_f); len = fprintf(state_f, "clock: %04x tv: %016lu %08lu adj: %08d\n", - clock_seq, last.tv_sec, last.tv_usec, adjustment); + clock_seq, last.tv_sec, (unsigned long)last.tv_usec, adjustment); fflush(state_f); if (ftruncate(state_fd, len) < 0) { fprintf(state_f, " \n"); diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 6e1391747..f74cfb24b 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 244 +#define VERSION_REVISION 245 #endif