Home | History | Annotate | Line # | Download | only in lint1
      1 /*	$NetBSD: msg_360.c,v 1.4 2024/11/05 06:23:04 rillig Exp $	*/
      2 # 3 "msg_360.c"
      3 
      4 // Test for message: missing new-style number base after '\177' [360]
      5 
      6 /*
      7  * The new-style format requires the number base as the second character.
      8  * This check is merely a byproduct of the implementation, it provides little
      9  * value of its own.
     10  */
     11 
     12 /* lint1-extra-flags: -X 351 */
     13 
     14 typedef typeof(sizeof(0)) size_t;
     15 typedef unsigned long long uint64_t;
     16 
     17 int snprintb(char *, size_t, const char *, uint64_t);
     18 
     19 void
     20 new_style_number_base(void)
     21 {
     22 	char buf[64];
     23 
     24 	/* expect+1: warning: missing new-style number base after '\177' [360] */
     25 	snprintb(buf, sizeof(buf), "\177", 0);
     26 	/* expect+1: warning: number base '\002' is 2, must be 8, 10 or 16 [361] */
     27 	snprintb(buf, sizeof(buf), "\177\002", 0);
     28 }
     29