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

MSVC compiler warnings #18

Open
andrew-elder opened this issue Jul 29, 2015 · 3 comments
Open

MSVC compiler warnings #18

andrew-elder opened this issue Jul 29, 2015 · 3 comments

Comments

@andrew-elder
Copy link
Contributor

MSVC is generating many compiler warnings. See below for a subset of them.

jdksavdecc_aecp.h(68): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(69): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(70): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(72): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data

    p->subtype = jdksavdecc_common_control_header_get_subtype( base, pos );
    p->sv = jdksavdecc_common_control_header_get_sv( base, pos );
    p->version = jdksavdecc_common_control_header_get_version( base, pos );
    p->message_type = jdksavdecc_common_control_header_get_control_data( base, pos );
    p->status = jdksavdecc_common_control_header_get_status( base, pos );

Should
jdksavdecc_common_control_header_get_subtype()
jdksavdecc_common_control_header_get_sv()
jdksavdecc_common_control_header_get_version()
jdksavdecc_common_control_header_get_status()
be modified to return uint8_t
?

@jdkoftinoff
Copy link
Owner

Yes

--jeffk++

On Jul 29, 2015, at 05:12, andrew-elder [email protected] wrote:

MSVC is generating many compiler warnings. See below for a subset of them.

jdksavdecc_aecp.h(68): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(69): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(70): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(72): warning C4244: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data

p->subtype = jdksavdecc_common_control_header_get_subtype( base, pos );
p->sv = jdksavdecc_common_control_header_get_sv( base, pos );
p->version = jdksavdecc_common_control_header_get_version( base, pos );
p->message_type = jdksavdecc_common_control_header_get_control_data( base, pos );
p->status = jdksavdecc_common_control_header_get_status( base, pos );

Should

jdksavdecc_common_control_header_get_subtype()
jdksavdecc_common_control_header_get_sv()
jdksavdecc_common_control_header_get_version()
jdksavdecc_common_control_header_get_status()
be modified to return uint8_t
?


Reply to this email directly or view it on GitHub.

@andrew-elder
Copy link
Contributor Author

Do you want me to do it?
There may be a few other similar cases.....

Regards,
Andrew

On 7/29/2015 10:22 AM, Jeff Koftinoff wrote:

Yes

--jeffk++

On Jul 29, 2015, at 05:12, andrew-elder [email protected] wrote:

MSVC is generating many compiler warnings. See below for a subset of them.

jdksavdecc_aecp.h(68): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(69): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(70): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(72): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data

p->subtype = jdksavdecc_common_control_header_get_subtype( base, pos );
p->sv = jdksavdecc_common_control_header_get_sv( base, pos );
p->version = jdksavdecc_common_control_header_get_version( base, pos );
p->message_type = jdksavdecc_common_control_header_get_control_data(
base, pos );
p->status = jdksavdecc_common_control_header_get_status( base, pos );
Should

jdksavdecc_common_control_header_get_subtype()
jdksavdecc_common_control_header_get_sv()
jdksavdecc_common_control_header_get_version()
jdksavdecc_common_control_header_get_status()
be modified to return uint8_t
?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#18 (comment).

Andrew Elder
AudioScience, Inc.
+1-585-271-8870
www.audioscience.com

@jdkoftinoff
Copy link
Owner

Yes please!

--jeffk++

On Jul 29, 2015, at 07:26, andrew-elder [email protected] wrote:

Do you want me to do it?
There may be a few other similar cases.....

Regards,
Andrew

On 7/29/2015 10:22 AM, Jeff Koftinoff wrote:

Yes

--jeffk++

On Jul 29, 2015, at 05:12, andrew-elder [email protected] wrote:

MSVC is generating many compiler warnings. See below for a subset of them.

jdksavdecc_aecp.h(68): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(69): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(70): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data
jdksavdecc_aecp.h(72): warning C4244: '=' : conversion from 'uint32_t'
to 'uint8_t', possible loss of data

p->subtype = jdksavdecc_common_control_header_get_subtype( base, pos );
p->sv = jdksavdecc_common_control_header_get_sv( base, pos );
p->version = jdksavdecc_common_control_header_get_version( base, pos );
p->message_type = jdksavdecc_common_control_header_get_control_data(
base, pos );
p->status = jdksavdecc_common_control_header_get_status( base, pos );
Should

jdksavdecc_common_control_header_get_subtype()
jdksavdecc_common_control_header_get_sv()
jdksavdecc_common_control_header_get_version()
jdksavdecc_common_control_header_get_status()
be modified to return uint8_t
?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#18 (comment).

Andrew Elder
AudioScience, Inc.
+1-585-271-8870
www.audioscience.com


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants