issue #82 fix gcc warnings for int64_t not being same as long long

pull/93/merge
Dibyendu Majumdar 8 years ago
parent eef44177e9
commit 222be03f79

@ -893,7 +893,7 @@ json_value * json_parse_ex (json_settings * settings,
};
}
if ( (++ top->parent->u.array.length) > state.uint_max)
if ( (++ top->parent->u.array.length) > (int)state.uint_max)
goto e_overflow;
top = top->parent;

@ -1079,7 +1079,7 @@ int vscode_get_request(FILE *in, membuff_t *mb, ProtocolMessage *req, FILE *log)
}
/* skip blank line - actually \r\n */
if (fgets(tbuf, sizeof tbuf, stdin) == NULL) {
fprintf(log, "FATAL ERROR - error reading second newline after Content-Length:\n", len);
fprintf(log, "FATAL ERROR - error reading second newline after Content-Length:\n");
exit(1);
}
/* Now read exact number of characters */
@ -1107,4 +1107,4 @@ int vscode_get_request(FILE *in, membuff_t *mb, ProtocolMessage *req, FILE *log)
void vscode_string_copy(char *buf, const char *src, size_t buflen) {
strncpy(buf, src, buflen);
buf[buflen - 1] = 0;
}
}

@ -105,7 +105,7 @@ typedef struct {
typedef struct {
char name[NAME_LEN];
char path[PATH_LEN];
int64_t sourceReference;
long long sourceReference;
} Source;
typedef struct {
@ -156,7 +156,7 @@ typedef struct {
*/
typedef struct {
int type;
int64_t seq;
long long seq;
union {
struct {
@ -236,7 +236,7 @@ typedef struct {
} CommonIntRequest;
struct {
int64_t integer64;
long long integer64;
} CommonInt64Request;
struct {
@ -274,7 +274,7 @@ typedef struct {
} VariablesRequest;
struct {
int64_t sourceReference;
long long sourceReference;
} SourceRequest;
struct {
@ -288,7 +288,7 @@ typedef struct {
struct {
int response_type;
int64_t request_seq;
long long request_seq;
int success;
char command[COMMAND_LEN];
char message[TEXT_LEN];
@ -397,4 +397,4 @@ extern void vscode_json_stringify(const char *src, char *dest, size_t len);
/* guaranteed null termination */
extern void vscode_string_copy(char *buf, const char *src, size_t buflen);
#endif
#endif

@ -162,8 +162,8 @@ static intptr_t ensure_value_fits_in_mantissa(intptr_t sourceReference) {
bits.expo = 0; /* cleanup */
bits.sign = 0; /* cleanup */
sourceReference = bits.i; /* extract mantissa */
fprintf(my_logger, "Source Reference WAS %lld NOW %lld\n", (int64_t)orig,
(int64_t)sourceReference);
fprintf(my_logger, "Source Reference WAS %lld NOW %lld\n", (long long)orig,
(long long)sourceReference);
return sourceReference;
}
@ -296,7 +296,7 @@ static void handle_source_request(ProtocolMessage *req, ProtocolMessage *res,
}
fprintf(my_logger,
"SEARCHED FOR sourceReference=%lld, found at stack depth = %d\n",
sourceReference, depth);
(long long)sourceReference, depth);
vscode_make_success_response(req, res, VSCODE_SOURCE_RESPONSE);
if (lua_getstack(L, depth, &entry)) {
int status = lua_getinfo(L, "Sln", &entry);

Loading…
Cancel
Save