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

Resolve build warnings #12

Closed
skliper opened this issue Jul 12, 2019 · 10 comments · Fixed by #26 or #45
Closed

Resolve build warnings #12

skliper opened this issue Jul 12, 2019 · 10 comments · Fixed by #26 or #45
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Jul 12, 2019

2 warnings from cc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

/home/jhageman/cFS/cFS-dev/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c: In function ‘ProcessStringArgument’:
/home/jhageman/cFS/cFS-dev/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:239:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
printf("String Length is %d.\n", stringLength);
^

/home/jhageman/cFS/cFS-dev/tools/cFS-GroundSystem/Subsystems/cmdUtil/sendUdp.c: In function ‘SendUdp’:
/home/jhageman/cFS/cFS-dev/tools/cFS-GroundSystem/Subsystems/cmdUtil/sendUdp.c:74:12: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
port = atoi(portNum);
^

@skliper skliper added bug Something isn't working good first issue Good for newcomers labels Jul 12, 2019
@mrosburg
Copy link

Okay, I try this issue.

@skliper skliper added this to the 2.1.0 milestone Jul 26, 2019
@skliper
Copy link
Contributor Author

skliper commented Jul 26, 2019

Heads up on the first one, preference is to fix the format vs cast.

@jphickey
Copy link
Contributor

On printf statements it is generally not possible to fix the format when the type is a fixed width int (i.e. uint32). A cast is generally needed here. My recommendation is to use %ld conversion AND cast the argument to "long int" as well.

@skliper
Copy link
Contributor Author

skliper commented Jul 26, 2019

stringLength is not a fixed point int. It's defined as long, just use %ld.

@jphickey
Copy link
Contributor

Yes I concur then, if it is actually "long" then no cast.

@skliper
Copy link
Contributor Author

skliper commented Aug 14, 2019

Any updates on this issue? Do you have an expected completion date?

@mrosburg
Copy link

mrosburg commented Aug 14, 2019 via email

@skliper
Copy link
Contributor Author

skliper commented Aug 27, 2019

@mrosburg - do you foresee addressing this one soon? If not planning reassignment to @avan989. We need the build warnings resolved for the end of summer release.

@mrosburg
Copy link

mrosburg commented Aug 27, 2019 via email

@avan989
Copy link
Contributor

avan989 commented Aug 29, 2019

I can do this.

skliper added a commit that referenced this issue Sep 6, 2019
Reviewed and approved at 2019-09-04 CCB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
4 participants