xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_115.c (revision 82d56013d7b633d116a93943de88e08335357a7c)
1 /*	$NetBSD: msg_115.c,v 1.4 2021/01/31 11:12:07 rillig Exp $	*/
2 # 3 "msg_115.c"
3 
4 // Test for message: %soperand of '%s' must be modifiable lvalue [115]
5 
6 void
7 example(const int *const_ptr)
8 {
9 
10 	*const_ptr = 3;		/* expect: 115 */
11 	*const_ptr += 1;	/* expect: 115 */
12 	*const_ptr -= 4;	/* expect: 115 */
13 	*const_ptr *= 1;	/* expect: 115 */
14 	*const_ptr /= 5;	/* expect: 115 */
15 	*const_ptr %= 9;	/* expect: 115 */
16 	(*const_ptr)++;		/* expect: 115 */
17 }
18