Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModelicaMatIO.c conversion warnings #2905

Closed
GarronFish opened this issue Apr 26, 2019 · 1 comment · Fixed by #3006
Closed

ModelicaMatIO.c conversion warnings #2905

GarronFish opened this issue Apr 26, 2019 · 1 comment · Fixed by #3006
Assignees
Labels
L: C-Sources Issue addresses Modelica/Resources/C-Sources
Milestone

Comments

@GarronFish
Copy link

When compiling a model that makes use of ModelicaMatIO.c I get the following warnings:
C:\Program Files\Dymola 2020 Beta 3\Source\ModelicaMatIO.c(6615): warning C4244: '=': conversion from 'size_t' to 'double', possible loss of data
C:\Program Files\Dymola 2020 Beta 3\Source\ModelicaMatIO.c(6624): warning C4244: '=': conversion from 'size_t' to 'double', possible loss of data

These warnings are due to the lines 6615 and 6624 in ModelicaMatIO.c:
tmp = matvar->dims[0];
and
tmp = matvar->dims[1];

I suggest that the following be used
tmp = (double)matvar->dims[0];
and
tmp = (double)matvar->dims[1];

@beutlich beutlich self-assigned this Apr 30, 2019
@beutlich beutlich added the L: C-Sources Issue addresses Modelica/Resources/C-Sources label Apr 30, 2019
@beutlich
Copy link
Member

beutlich commented Apr 30, 2019

This is an upstream issue of matio. It will be fixed once a new version of matio is released and merged into ModelicaMatIO.

tbeu added a commit to tbeu/matio that referenced this issue Jun 19, 2019
@beutlich beutlich added this to the MSL4.0.0 milestone Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: C-Sources Issue addresses Modelica/Resources/C-Sources
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants