Skip to content

Commit

Permalink
Avoided compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunyarakun committed Sep 10, 2009
1 parent 0713b76 commit 6d52c85
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/proc.c
Expand Up @@ -23,7 +23,7 @@
#include "ql.h"

/**** globals for procs ****/
char *admin_html_path = NULL;
const char *admin_html_path = NULL;

/**** procs ****/

Expand Down
2 changes: 1 addition & 1 deletion lib/proc.h
Expand Up @@ -25,7 +25,7 @@
extern "C" {
#endif

extern char *admin_html_path;
extern const char *admin_html_path;
void grn_db_init_builtin_query(grn_ctx *ctx);

#ifdef __cplusplus
Expand Down
6 changes: 3 additions & 3 deletions lib/str.c
Expand Up @@ -1615,7 +1615,7 @@ grn_str_tok(const char *str, size_t str_len, char delim, const char **tokbuf, in

inline static void
op_getopt_flag(int *flags, const grn_str_getopt_opt *o,
int argc, char * const argv[], int *i, char * const optvalue)
int argc, char * const argv[], int *i, const char *optvalue)
{
switch (o->op) {
case getopt_op_none:
Expand All @@ -1634,7 +1634,7 @@ op_getopt_flag(int *flags, const grn_str_getopt_opt *o,
}
if (o->arg) {
if (optvalue) {
*o->arg = optvalue;
*o->arg = (char *)optvalue;
} else {
if (++(*i) < argc) {
*o->arg = argv[*i];
Expand All @@ -1656,7 +1656,7 @@ grn_str_getopt(int argc, char * const argv[], const grn_str_getopt_opt *opts,
const grn_str_getopt_opt *o;
int found;
if (*++v == '-') {
char *eq;
const char *eq;
size_t len;
found = 0;
v++;
Expand Down
2 changes: 1 addition & 1 deletion lib/str.h
Expand Up @@ -39,7 +39,7 @@ typedef enum {
typedef struct {
const char opt; /* ends opt == 0 && longopt == NULL */
const char *longopt;
char **arg; /* if NULL, no arg are required */
const char **arg; /* if NULL, no arg are required */
int flag;
grn_str_getopt_op op;
} grn_str_getopt_opt;
Expand Down
2 changes: 1 addition & 1 deletion src/grnslap.c
Expand Up @@ -320,7 +320,7 @@ enum {
int
main(int argc, char **argv)
{
char *protostr = NULL, *maxconstr = NULL, *maxtpstr = NULL;
const char *protostr = NULL, *maxconstr = NULL, *maxtpstr = NULL;
int r, i, flags = 0;
static grn_str_getopt_opt opts[] = {
{'P', NULL, NULL, 0, getopt_op_none},
Expand Down
6 changes: 3 additions & 3 deletions src/groonga.c
Expand Up @@ -1142,9 +1142,9 @@ int
main(int argc, char **argv)
{
grn_encoding enc = GRN_ENC_DEFAULT;
char *portstr = NULL, *encstr = NULL,
*max_nfthreadsstr = NULL, *loglevel = NULL,
*hostnamestr = NULL;
const char *portstr = NULL, *encstr = NULL,
*max_nfthreadsstr = NULL, *loglevel = NULL,
*hostnamestr = NULL;
int r, i, mode = mode_alone;
static grn_str_getopt_opt opts[] = {
{'p', NULL, NULL, 0, getopt_op_none},
Expand Down

0 comments on commit 6d52c85

Please sign in to comment.