Skip to content

Fix return type of CrFwGetCurrentTime()#1

Open
LeUlukai wants to merge 1 commit into
pnp-software:masterfrom
LeUlukai:fix-crfwgetcurrenttime
Open

Fix return type of CrFwGetCurrentTime()#1
LeUlukai wants to merge 1 commit into
pnp-software:masterfrom
LeUlukai:fix-crfwgetcurrenttime

Conversation

@LeUlukai

Copy link
Copy Markdown

When building on Ubuntu 18.04 with gcc version 7.4.0, the compilation of cordetfw-examples fails with

====================================================================================
 Compile the C2 Configuration Files for the Master Application 
====================================================================================
./src//CrConfigDemoMaster/CrFwTime.c:45:12: error: conflicting types for ‘CrFwGetCurrentTime’
 CrFwTime_t CrFwGetCurrentTime() {
            ^~~~~~~~~~~~~~~~~~
In file included from ./src//CrConfigDemoMaster/CrFwTime.c:33:0:
./lib/cordetfw/src/CrFwTime.h:39:17: note: previous declaration of ‘CrFwGetCurrentTime’ was here
 CrFwTimeStamp_t CrFwGetCurrentTime();
                 ^~~~~~~~~~~~~~~~~~

The declaration of CrFwGetCurrentTime() in CrFwTime.h and the defintion in the master and slave applications do not match -- they differ in the return type: CrFwTimeStamp_t vs. CrFwTime_t.

This PR just changes the return types of the definitions in the example files to match them with the declaration in cordetfw.

The variable dummyTime, which is returned in the definitions of CrFwGetCurrentTime(), has also the type CrFwTimeStamp_t, so this change should be fine here.

The declaration from cordetfw and the definitions in the examples did not match.
@LeUlukai LeUlukai changed the title Fix return value of CrFwGetCurrentTime Fix return type of CrFwGetCurrentTime() Aug 29, 2019
@pasetti

pasetti commented Aug 29, 2019

Copy link
Copy Markdown
Contributor

Thanks for the contribution. Your fix looks OK. But please note that, starting from the current release of the cordetfw (Release 1.0.0), we are no longer supporting/maintaining the cordetfw-examples. The cordetfw-examples project was created as a test bed for the cordetfw at a time when there were no industrial applications of the cordetfw but release 1.0.0 of the cordetfw has some industrial heritage and is being used in a couple of industrial projects and therefore we believe that we no longer need the cordetfw-examples project. I will make this point clear in the project description.

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

Successfully merging this pull request may close these issues.

2 participants