Changeset 1358:cf411b1dcbbb in freeDiameter for extensions/dict_json
- Timestamp:
- May 29, 2019, 11:36:32 PM (5 years ago)
- Branch:
- default
- Children:
- 1359:09f94b1bedc3, 1362:56f9e13f0ef0
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dict_json/json-schema-to-c.cc
r1355 r1358 38 38 #include <string.h> 39 39 #include <sys/stat.h> 40 #include <unistd.h> 40 41 41 42 #include <json/SchemaValidator.h> … … 92 93 off_t n = stat_buf.st_size; 93 94 if (max_size > 0 && n > max_size) { 94 fprintf (stderr, "%s file [%s] is larger than % " PRIi64 " bytes\n", desc, filename, (int64_t)max_size);95 fprintf (stderr, "%s file [%s] is larger than %lld bytes\n", desc, filename, (long long)max_size); 95 96 fclose (fp); 96 97 return NULL; … … 98 99 char *buf; 99 100 if ((buf = (char *) malloc ((size_t)n+1)) == NULL) { 100 fprintf (stderr, "error allocating % " PRIi64 " bytes for read of %s file [%s]\n", (int64_t)n, desc, filename);101 fprintf (stderr, "error allocating %lld bytes for read of %s file [%s]\n", (long long)n, desc, filename); 101 102 fclose (fp); 102 103 return NULL; … … 181 182 Json::Value json; 182 183 if (!reader.parse(str, json)) { 183 fprintf(stderr, "%s: parse error: %s\n", input, reader.getFormattedErrorMessages() );184 fprintf(stderr, "%s: parse error: %s\n", input, reader.getFormattedErrorMessages().c_str()); 184 185 exit(1); 185 186 }
Note: See TracChangeset
for help on using the changeset viewer.