shithub: scc

Download patch

ref: 7e4b96f8949a4dc2e1da9a003b148ab0973123b0
parent: 2ef958d9809092755fd5fb1f154c8ab97cb8604e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue May 17 09:19:20 EDT 2022

libc: Add some const poison to strftime()

These consts shut up some warnings and they don't add
any additional problems.

--- a/src/libc/time/strftime.c
+++ b/src/libc/time/strftime.c
@@ -32,7 +32,7 @@
 }
 
 static int
-weeknum(struct tm *tm, int day)
+weeknum(const struct tm *tm, int day)
 {
 	int fday, val;
 
@@ -48,7 +48,7 @@
 }
 
 static int
-isoyear(struct tm *tm)
+isoyear(const struct tm *tm)
 {
 	int monday;
 
@@ -65,7 +65,7 @@
 }
 
 static int
-isoweek(struct tm *tm)
+isoweek(const struct tm *tm)
 {
 	int year, monday, yday, val;
 
@@ -83,7 +83,7 @@
 }
 
 static int
-isoday(struct tm *tm)
+isoday(const struct tm *tm)
 {
 	if (tm->tm_wday == 0)
 		return 7;