diff options
author | raveit65 <[email protected]> | 2023-10-22 14:24:54 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-10-25 10:03:32 +0200 |
commit | 70c1c9501e96082f8334e5ed23f9c15ada3d9c69 (patch) | |
tree | c704d250ccb38fff7d3c4d574c48fba536ba7cc1 | |
parent | 6463a0e845c19e5f231a38e70262a0d93b57df99 (diff) | |
download | libmateweather-70c1c9501e96082f8334e5ed23f9c15ada3d9c69.tar.bz2 libmateweather-70c1c9501e96082f8334e5ed23f9c15ada3d9c69.tar.xz |
timezone: declare 'tzdir' as 'const char'
fixes build warning
```
mateweather-timezone.c:74:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
74 | tzdir = g_getenv ("TZDIR");
```
-rw-r--r-- | libmateweather/mateweather-timezone.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmateweather/mateweather-timezone.c b/libmateweather/mateweather-timezone.c index 182c4b0..3b4c790 100644 --- a/libmateweather/mateweather-timezone.c +++ b/libmateweather/mateweather-timezone.c @@ -61,7 +61,8 @@ static gboolean parse_tzdata (const char *tzname, time_t start, time_t end, int *offset, gboolean *has_dst, int *dst_offset) { - char *tzdir, *filename, *contents; + char *filename, *contents; + const char *tzdir; gsize length; int timecnt, transitions_size, ttinfo_map_size; int initial_transition = -1, second_transition = -1; |