@@ -896,7 +896,7 @@ _dispatch_get_build(void)
896896#if HAVE_OS_FAULT_WITH_PAYLOAD
897897__attribute__((__format__ (__printf__ ,2 ,3 )))
898898static void
899- _dispatch_fault (const char * reason , const char * fmt , ...)
899+ _dispatch_fault (const char * restrict reason , const char * restrict fmt , ...)
900900{
901901 char buf [1024 ];
902902 va_list ap ;
@@ -1183,7 +1183,7 @@ _dispatch_log_file(char *buf, size_t len)
11831183
11841184DISPATCH_NOINLINE
11851185static void
1186- _dispatch_logv_file (const char * msg , va_list ap )
1186+ _dispatch_logv_file (const char * restrict msg , va_list ap )
11871187{
11881188 char buf [2048 ];
11891189 size_t bufsiz = sizeof (buf ), offset = 0 ;
@@ -1204,13 +1204,13 @@ _dispatch_logv_file(const char *msg, va_list ap)
12041204
12051205#if DISPATCH_USE_SIMPLE_ASL
12061206static inline void
1207- _dispatch_syslog (const char * msg )
1207+ _dispatch_syslog (const char * restrict msg )
12081208{
12091209 _simple_asl_log (ASL_LEVEL_NOTICE , "com.apple.libsystem.libdispatch" , msg );
12101210}
12111211
12121212static inline void
1213- _dispatch_vsyslog (const char * msg , va_list ap )
1213+ _dispatch_vsyslog (const char * restrict msg , va_list ap )
12141214{
12151215 char * str ;
12161216 vasprintf (& str , msg , ap );
@@ -1221,13 +1221,13 @@ _dispatch_vsyslog(const char *msg, va_list ap)
12211221}
12221222#elif defined(_WIN32 )
12231223static inline void
1224- _dispatch_syslog (const char * msg )
1224+ _dispatch_syslog (const char * restrict msg )
12251225{
12261226 OutputDebugStringA (msg );
12271227}
12281228
12291229static inline void
1230- _dispatch_vsyslog (const char * msg , va_list ap )
1230+ _dispatch_vsyslog (const char * restrict msg , va_list ap )
12311231{
12321232 va_list argp ;
12331233
@@ -1251,21 +1251,21 @@ _dispatch_vsyslog(const char *msg, va_list ap)
12511251}
12521252#else // DISPATCH_USE_SIMPLE_ASL
12531253static inline void
1254- _dispatch_syslog (const char * msg )
1254+ _dispatch_syslog (const char * restrict msg )
12551255{
12561256 syslog (LOG_NOTICE , "%s" , msg );
12571257}
12581258
12591259static inline void
1260- _dispatch_vsyslog (const char * msg , va_list ap )
1260+ _dispatch_vsyslog (const char * restrict msg , va_list ap )
12611261{
12621262 vsyslog (LOG_NOTICE , msg , ap );
12631263}
12641264#endif // DISPATCH_USE_SIMPLE_ASL
12651265
12661266DISPATCH_ALWAYS_INLINE
12671267static inline void
1268- _dispatch_logv (const char * msg , size_t len , va_list * ap_ptr )
1268+ _dispatch_logv (const char * restrict msg , size_t len , va_list * restrict ap_ptr )
12691269{
12701270 dispatch_once_f (& _dispatch_logv_pred , NULL , _dispatch_logv_init );
12711271 if (unlikely (dispatch_log_disabled )) {
@@ -1285,7 +1285,7 @@ _dispatch_logv(const char *msg, size_t len, va_list *ap_ptr)
12851285
12861286DISPATCH_NOINLINE
12871287void
1288- _dispatch_log (const char * msg , ...)
1288+ _dispatch_log (const char * restrict msg , ...)
12891289{
12901290 va_list ap ;
12911291
@@ -1300,15 +1300,15 @@ _dispatch_log(const char *msg, ...)
13001300#pragma mark dispatch_debug
13011301
13021302static size_t
1303- _dispatch_object_debug2 (dispatch_object_t dou , char * buf , size_t bufsiz )
1303+ _dispatch_object_debug2 (dispatch_object_t dou , char * restrict buf , size_t bufsiz )
13041304{
13051305 DISPATCH_OBJECT_TFB (_dispatch_objc_debug , dou , buf , bufsiz );
13061306 return dx_debug (dou ._do , buf , bufsiz );
13071307}
13081308
13091309DISPATCH_NOINLINE
13101310static void
1311- _dispatch_debugv (dispatch_object_t dou , const char * msg , va_list ap )
1311+ _dispatch_debugv (dispatch_object_t dou , const char * restrict msg , va_list ap )
13121312{
13131313 char buf [2048 ];
13141314 size_t bufsiz = sizeof (buf ), offset = 0 ;
@@ -1341,14 +1341,14 @@ _dispatch_debugv(dispatch_object_t dou, const char *msg, va_list ap)
13411341
13421342DISPATCH_NOINLINE
13431343void
1344- dispatch_debugv (dispatch_object_t dou , const char * msg , va_list ap )
1344+ dispatch_debugv (dispatch_object_t dou , const char * restrict msg , va_list ap )
13451345{
13461346 _dispatch_debugv (dou , msg , ap );
13471347}
13481348
13491349DISPATCH_NOINLINE
13501350void
1351- dispatch_debug (dispatch_object_t dou , const char * msg , ...)
1351+ dispatch_debug (dispatch_object_t dou , const char * restrict msg , ...)
13521352{
13531353 va_list ap ;
13541354
@@ -1360,7 +1360,7 @@ dispatch_debug(dispatch_object_t dou, const char *msg, ...)
13601360#if DISPATCH_DEBUG
13611361DISPATCH_NOINLINE
13621362void
1363- _dispatch_object_debug (dispatch_object_t dou , const char * msg , ...)
1363+ _dispatch_object_debug (dispatch_object_t dou , const char * restrict msg , ...)
13641364{
13651365 va_list ap ;
13661366
0 commit comments