Fixes for more discerning compilers.

pull/13171/head
Joshua Haberman 15 years ago
parent 00ba0d1ac1
commit a022e6ebdb
  1. 5
      benchmarks/main.c
  2. 2
      src/upb_string.h

@ -24,7 +24,10 @@ int main (int argc, char *argv[])
char *progname = argv[0];
if(lastslash) {
*lastslash = '\0';
chdir(argv[0]);
if(chdir(argv[0]) < 0) {
fprintf(stderr, "Error changing directory to %s.\n", argv[0]);
return 1;
}
*lastslash = '/';
progname = lastslash + 3; /* "/b_" */
}

@ -96,7 +96,7 @@ INLINE struct upb_string *upb_strdup(struct upb_string *s) {
return copy;
}
INLINE struct upb_string *upb_strdupc(char *s) {
INLINE struct upb_string *upb_strdupc(const char *s) {
struct upb_string *copy = upb_string_new();
copy->byte_len = strlen(s);
upb_string_resize(copy, copy->byte_len);

Loading…
Cancel
Save