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

strncpy -> rtapi_strlcpy for string termination #2683

Merged
merged 1 commit into from
Jul 7, 2024
Merged

Conversation

smoe
Copy link
Contributor

@smoe smoe commented Oct 7, 2023

Stuttgart LinuxCNC attempt to address compiler warnings.

Using rtapi_strlcpy to always have 0-terminated strings.

@petterreinholdtsen
Copy link
Collaborator

"libnml/buffer/shmem.cc:318:10: error: ‘rtapi_strlcpy’ was not declared in this scope"

Missing include file?

@gmoccapy
Copy link
Collaborator

gmoccapy commented Oct 7, 2023

linuxcnc stuttgart meeting (norbert not to blame) says merge when CI passes. eventually convert to std::string.

@petterreinholdtsen
Copy link
Collaborator

The std::string proposal came up in #1922 too. How can we decide if we want to move towards std::string or not?

@smoe
Copy link
Contributor Author

smoe commented Oct 9, 2023

Some tests are failing:

Running test: ./tests/twopass-personality
Running test: ./tests/twopass
Running test: ./tests/uspace/spawnv-root
Runtest: 259 tests run, 257 successful, 2 failed + 0 expected, 1 skipped
Failed: 
	./tests/motion-logger/mountaindew
	./tests/remap/remap-io

Let's see if that also happens for other PRs or if I have indeed messed something up.

Moved #incl of rtapi_string outside extern C

Remove request for consts

Added FIXME about memory leak and fixed whitespace issue (Petter)

Rebased by Petter Reinhodltsen on top of current 2.9.
@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Jul 6, 2024 via email

@andypugh andypugh merged commit 59439cc into LinuxCNC:2.9 Jul 7, 2024
11 checks passed
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.

4 participants