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

Fix compilation errors when using tasking compiler(cctc) #494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snikeguo
Copy link

@snikeguo snikeguo commented Dec 1, 2020

Fix compilation errors when using tasking compiler

Copy link
Member

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @snikeguo, thanks for making a PR (related #481).

Happy to take in the casts, thanks for those.

However, the expanded LFS_MKATTRS macro adds to much noise. Is there an alternative way to make the tasking compiler happy?

},
};
int __attrcount__=sizeof(__lfs_mattr__)/sizeof(struct lfs_mattr);
err = lfs_dir_commit(lfs, dir, __lfs_mattr__,__attrcount__);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this change adds too much noise and defeats the API of the internal lfs_dir_commit function. Is there an alternative?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no .the tasking compiler is a professional compiler in the field of automotive electronics. This compiler does not support high C language standard(such as : c14)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What warning does cctc output for this line? LFS_MKATTRS just passes a point to a stack allocated array of static size, which shouldn't be too strange.

littlefs is should be strictly c99, otherwise useful features such as inline, arbitrary variable declarations, uint32_t, wouldn't be available.

@geky geky added the lint label Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants