Changeset: ae0871ee0b28 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae0871ee0b28
Modified Files:
monetdb5/extras/pyapi/pyapi.c
monetdb5/extras/pyapi/unicode.c
Branch: pyapi
Log Message:
Clang fix.
diffs (37 lines):
diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c
--- a/monetdb5/extras/pyapi/pyapi.c
+++ b/monetdb5/extras/pyapi/pyapi.c
@@ -1853,7 +1853,7 @@ char* FormatCode(char* code, char **args
size_t i = 0, j = 0, k = 0;
size_t length = strlen(code);
size_t size = 0;
- size_t spaces_per_level = 4;
+ size_t spaces_per_level = 2;
size_t code_location = 0;
char *newcode = NULL;
@@ -1942,8 +1942,9 @@ char* FormatCode(char* code, char **args
// If there is no room in the indentation arrays we will
extend them
// This probably will never happen unless in really
extreme code (or if max_indentation is set very low)
size_t *new_indentation = GDKzalloc(2 * max_indentation *
sizeof(size_t));
+ size_t *new_statements_per_level;
if (new_indentation == NULL) goto finally;
- size_t *new_statements_per_level = GDKzalloc(2 *
max_indentation * sizeof(size_t));
+ new_statements_per_level = GDKzalloc(2 * max_indentation *
sizeof(size_t));
if (new_statements_per_level == NULL) goto finally;
for(i = 0; i < max_indentation; i++) {
diff --git a/monetdb5/extras/pyapi/unicode.c b/monetdb5/extras/pyapi/unicode.c
--- a/monetdb5/extras/pyapi/unicode.c
+++ b/monetdb5/extras/pyapi/unicode.c
@@ -10,8 +10,9 @@ int utf8_strlen(const char *utf8_str, bo
//we traverse the string and simply count the amount of utf8 characters in
the string
while (true)
{
+ int offset;
if (utf8_str[i] == '\0') break;
- int offset = utf8_length(utf8_str[i]);
+ offset = utf8_length(utf8_str[i]);
if (offset < 0) return -1; //invalid utf8 character
i += offset;
utf8_char_count++;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list