#2 mod_blosxom 0.05 compile warnings

open
nobody
None
5
2003-03-30
2003-03-30
Ewen McNeill
No

When compiling mod_blosxom 0.05 with Apache 1.3.26
(using apxs), there are a few compile warnings about
incompatible pointers. These are due to the difference
between const char * and char *. These warnings can be
eliminated with the following changes:

-=- cut here -=-
--- mod_blosxom.c-orig-2003-03-30 Thu Aug 29
22:11:28 2002
+++ mod_blosxom.c-broken-2003-03-30 Sun Mar 30
23:13:25 2003
@@ -386,7 +386,7 @@
}

-static char *each_sub_blog(request_rec *r, char
*path_info)
+static char *each_sub_blog(request_rec *r, const char
*path_info)
{
char *head, *subblog;

@@ -422,7 +422,7 @@
blosxom_dir_config *cfg;
table *template;
char *pi_yr, *pi_mo, *pi_da, *id, *pi;
- char *p;
+ const char *p;
char *user_t;
char *curdate, *lastdate;
int max_ent;
@@ -527,7 +525,7 @@
max_ent = cfg->num_entries;
lastdate = "";
for (; (*list) != NULL && list != NULL; list++) {
- char *fn, *yr, *mo, *da, *ti;
+ const char *fn, *yr, *mo, *da, *ti;
char *pos;
int max;

-=- cut here -=-

(The -broken file is the one before making the
ap_pstrcat() to ap_pstrdup() change reported in my
other bug report. It compiles without warnings, and
would work if ap_pstrcat() didn't cause a crash. With
that one line change in my other bug report it works fine.)

Ewen

Discussion