diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-03-02 19:10:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-03-02 19:10:51 (GMT) |
commit | fbebfae209139fccb15fde8fb7d1bdbb4b941875 (patch) | |
tree | 451d9d2cb66489e4ab427301909c58b4cbb63948 /libmscgen/mscgen_api.c | |
parent | 6c06e912338176303d1a1e041a39984ff6fd42be (diff) | |
download | Doxygen-fbebfae209139fccb15fde8fb7d1bdbb4b941875.zip Doxygen-fbebfae209139fccb15fde8fb7d1bdbb4b941875.tar.gz Doxygen-fbebfae209139fccb15fde8fb7d1bdbb4b941875.tar.bz2 |
Fix a number of compiler warnings in the 64bit build for Windows
Diffstat (limited to 'libmscgen/mscgen_api.c')
-rw-r--r-- | libmscgen/mscgen_api.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libmscgen/mscgen_api.c b/libmscgen/mscgen_api.c index b28d653..376b9d8 100644 --- a/libmscgen/mscgen_api.c +++ b/libmscgen/mscgen_api.c @@ -300,7 +300,7 @@ static char *splitStringToWidth(Context *ctx, char *l, unsigned int width) /* Copy the remaining line to the start of the string */ m = 0; - n = (p - l); + n = (int)(p - l); while (isspace(orig[n]) && orig[n] != '\0') { @@ -390,7 +390,7 @@ static unsigned int computeLabelLines(Context *ctx, char *nextLine = strstr(label, "\\n"); if (nextLine) { - const int lineLen = nextLine - label; + const int lineLen = (int)(nextLine - label); /* Allocate storage and duplicate the line */ retLines[c] = malloc_s(lineLen + 1); @@ -633,11 +633,11 @@ static char *getLine(const char *string, /* Determine the length of the line */ if(lineEnd != NULL) { - lineLen = lineEnd - lineStart; + lineLen = (unsigned int)(lineEnd - lineStart); } else { - lineLen = strlen(string) - (lineStart - string); + lineLen = (unsigned int)(strlen(string) - (lineStart - string)); } /* Clamp the length to the buffer */ @@ -1328,8 +1328,8 @@ static void arcLine(Context *ctx, hasArrows = FALSE; /* Get co-ordinates of the arc end-point */ - ADrawComputeArcPoint(sx, y - 1, ctx->opts.entitySpacing - 8, - ctx->opts.loopArcHeight, 180.0f - 45.0f, + ADrawComputeArcPoint((float)sx, (float)(y - 1), (float)(ctx->opts.entitySpacing - 8), + (float)ctx->opts.loopArcHeight, 180.0f - 45.0f, &px, &py); /* Draw a cross */ @@ -1392,8 +1392,9 @@ static void arcLine(Context *ctx, hasArrows = FALSE; /* Get co-ordinates of the arc end-point */ - ADrawComputeArcPoint(sx, y - 1, ctx->opts.entitySpacing - 8, - ctx->opts.loopArcHeight, 45.0f, + ADrawComputeArcPoint((float)sx, (float)(y - 1), + (float)(ctx->opts.entitySpacing - 8), + (float)ctx->opts.loopArcHeight, 45.0f, &px, &py); /* Draw a cross */ |