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-08 13:31:54 (GMT) |
commit | 4658413ff3b9551fac67907f296a586e9f2c15ed (patch) | |
tree | 495ea78acb2a9d7463540f9e711530a0d42f3e72 /libmscgen/mscgen_api.c | |
parent | 6c06e912338176303d1a1e041a39984ff6fd42be (diff) | |
download | Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.zip Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.tar.gz Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.tar.bz2 |
Enabled stricter compiler warnings and fixed all new warnings
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 */ |