Skip to content

Commit

Permalink
const'ify string literals
Browse files Browse the repository at this point in the history
(librdf_query_virtuoso_init): const'ify seps

redland-virtuoso-test (main): const'ify query_cmd
  • Loading branch information
hroptatyr committed Oct 9, 2014
1 parent d00ac9e commit 5e6d0fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rdf_query_virtuoso.c
Expand Up @@ -169,7 +169,7 @@ librdf_query_virtuoso_init(librdf_query* query, const char *name,
librdf_query_virtuoso_context *context;
size_t len;
unsigned char *query_string_copy;
char *seps={(char *)" \t\n\r\f"};
const char *const seps={(const char *)" \t\n\r\f"};
char *token;

context = (librdf_query_virtuoso_context*)query->context;
Expand Down
8 changes: 4 additions & 4 deletions utils/redland-virtuoso-test.c
Expand Up @@ -368,7 +368,7 @@ main(int argc, char *argv[])
const char* identifier;
const char* results_format;
librdf_statement* statement=NULL;
char* query_cmd=NULL;
const char* query_cmd=NULL;
char* s;


Expand Down Expand Up @@ -783,7 +783,7 @@ main(int argc, char *argv[])


/***** Test 18 *****/
query_cmd=(char *)"CONSTRUCT {?s ?p ?o} FROM <http://red> WHERE {?s ?p ?o}";
query_cmd=(const char *)"CONSTRUCT {?s ?p ?o} FROM <http://red> WHERE {?s ?p ?o}";
startTest(18, " Exec: QUERY \"%s\" \n", query_cmd);
{
query=librdf_new_query(world, (char *)"vsparql", NULL, (const unsigned char *)query_cmd, NULL);
Expand Down Expand Up @@ -830,7 +830,7 @@ main(int argc, char *argv[])


/***** Test 19 *****/
query_cmd=(char *)"SELECT * WHERE {graph <http://red> { ?s ?p ?o }}";
query_cmd=(const char *)"SELECT * WHERE {graph <http://red> { ?s ?p ?o }}";
startTest(19, " Exec1: QUERY_AS_BINDINGS \"%s\" \n", query_cmd);
{
query=librdf_new_query(world, (char *)"vsparql", NULL, (const unsigned char *)query_cmd, NULL);
Expand Down Expand Up @@ -866,7 +866,7 @@ main(int argc, char *argv[])


/***** Test 20 *****/
query_cmd=(char *)"SELECT * WHERE {graph <http://red> { ?s ?p ?o }}";
query_cmd=(const char *)"SELECT * WHERE {graph <http://red> { ?s ?p ?o }}";
startTest(20, " Exec2: QUERY_AS_BINDINGS \"%s\" \n", query_cmd);
{
query=librdf_new_query(world, (char *)"vsparql", NULL, (const unsigned char *)query_cmd, NULL);
Expand Down

0 comments on commit 5e6d0fa

Please sign in to comment.