-
Notifications
You must be signed in to change notification settings - Fork 206
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
fix#2316 - CFE_TIME_Print() calls strftime() #2356
Conversation
Switching this to draft as I consider whether we can, instead, just deprecate and point folks at strftime directly. |
0ddf8b8
to
8c07830
Compare
UT_GenStub_AddParam(CFE_TIME_Print, char *, PrintBuffer); | ||
UT_GenStub_AddParam(CFE_TIME_Print, CFE_TIME_SysTime_t, TimeToPrint); | ||
|
||
UT_GenStub_Execute(CFE_TIME_Print, Basic, UT_DefaultHandler_CFE_TIME_Print); | ||
|
||
return UT_GenStub_GetReturnValue(CFE_TIME_Print, CFE_Status_t); |
Check warning
Code scanning / CodeQL
Uses of recursion
{ | ||
UT_GenStub_SetupReturnBuffer(CFE_TIME_Print, CFE_Status_t); |
Check warning
Code scanning / CodeQL
Uses of recursion
@@ -305,12 +305,16 @@ | |||
* Generated stub function for CFE_TIME_Print() | |||
* ---------------------------------------------------- | |||
*/ | |||
void CFE_TIME_Print(char *PrintBuffer, CFE_TIME_SysTime_t TimeToPrint) | |||
CFE_Status_t CFE_TIME_Print(char *PrintBuffer, CFE_TIME_SysTime_t TimeToPrint) |
Check notice
Code scanning / CodeQL
Long function without assertion
@@ -563,150 +565,28 @@ | |||
* See description in header file for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
void CFE_TIME_Print(char *PrintBuffer, CFE_TIME_SysTime_t TimeToPrint) | |||
CFE_Status_t CFE_TIME_Print(char *PrintBuffer, CFE_TIME_SysTime_t TimeToPrint) |
Check notice
Code scanning / CodeQL
Long function without assertion
5100004
to
861a42f
Compare
861a42f
to
ba01055
Compare
*Combines:* cFE v7.0.0-rc4+dev334 osal v6.0.0-rc4+dev217 **Includes:** *cFS* - #680 - #676 *cFE* - nasa/cFE#2350 - nasa/cFE#2354 - nasa/cFE#2355 - nasa/cFE#2366 - nasa/cFE#2364 - nasa/cFE#2356 - nasa/cFE#2361 *osal* - nasa/osal#1393 Co-authored by: Daniel Knutsen <[email protected]> Co-authored by: Justin Figueroa <[email protected]> Co-authored by: Chris Knight <[email protected]>
*Combines:* cFE v7.0.0-rc4+dev334 osal v6.0.0-rc4+dev217 **Includes:** *cFS* - #680 - #676 *cFE* - nasa/cFE#2350 - nasa/cFE#2354 - nasa/cFE#2355 - nasa/cFE#2366 - nasa/cFE#2364 - nasa/cFE#2356 - nasa/cFE#2361 *osal* - nasa/osal#1393 Co-authored by: Daniel Knutsen <[email protected]> Co-authored by: Justin Figueroa <[email protected]> Co-authored by: Chris Knight <[email protected]>
Fix#2388, Revert "Merge pull request #2356 from CDKnightNASA/fix-2316-time_fmt"
@CDKnightNASA Would you be able to re-open this PR so we can tag it for Equuleus-rc2 (based on last week's discussion, we decided to hold off the change until after this release)? |
I think I'll have to create a new PR? I don't see a way to re-open this PR as it's marked as merged. |
I went ahead and created #2390, which reverts the revert, and assigned it to Equuleus-rc2. |
Checklist (Please check before submitting)
Describe the contribution
CFE_TIME_Print() calls strftime to format times and returns a status code rather than creating a syslog entry. Note that this may be expanded to allow this to be configurable or parameterized (although EVS may just call strftime directly.)
Also collapsed epoch defines to SECONDS and MICROS for more performance and simpler configuration.
Testing performed
Standard build and UT tests updated.
Expected behavior changes
Function returns CFE_Status_t status.
NOTE strftime uses time_t which may be 32- or 64-bit and may be signed or unsigned, depending on the platform.
System(s) tested on
Ubuntu 22.04LTS
Additional context
https://en.wikipedia.org/w/index.php?title=Time_t&oldid=450752800
Third party code
None.
Contributor Info - All information REQUIRED for consideration of pull request
[email protected]