You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/15 04:50:19 UTC
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 opened a new pull request, #1199: Remove the non standard c++ header file inclusion
xiaoxiang781216 opened a new pull request, #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199
## Summary
Found by https://github.com/apache/incubator-nuttx/pull/6434
## Impact
## Testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#discussion_r898072882
##########
graphics/nxwm/src/ckeyboard.cxx:
##########
@@ -167,7 +167,7 @@ int CKeyboard::open(void)
{
// Try to open the keyboard device
- fd = std::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
+ fd = open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
Review Comment:
```suggestion
fd = ::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
```
##########
graphics/nxwm/src/cnxterm.cxx:
##########
@@ -489,16 +489,16 @@ int CNxTerm::nxterm(int argc, char *argv[])
std::fflush(stderr);
#ifdef CONFIG_NXTERM_NXKBDIN
- std::dup2(fd, 0);
+ dup2(fd, 0);
#endif
- std::dup2(fd, 1);
- std::dup2(fd, 2);
+ dup2(fd, 1);
+ dup2(fd, 2);
// And we can close our original driver file descriptor
if (fd > 2)
{
- std::close(fd);
+ close(fd);
Review Comment:
```suggestion
::close(fd);
```
##########
graphics/twm4nx/apps/cnxterm.cxx:
##########
@@ -402,16 +402,16 @@ int CNxTerm::nxterm(int argc, char *argv[])
std::fflush(stderr);
#ifdef CONFIG_NXTERM_NXKBDIN
- std::dup2(fd, 0);
+ dup2(fd, 0);
#endif
- std::dup2(fd, 1);
- std::dup2(fd, 2);
+ dup2(fd, 1);
+ dup2(fd, 2);
// And we can close our original driver file descriptor
if (fd > 2)
{
- std::close(fd);
+ close(fd);
Review Comment:
```suggestion
::close(fd);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#discussion_r898153322
##########
graphics/nxwm/src/ckeyboard.cxx:
##########
@@ -167,7 +167,7 @@ int CKeyboard::open(void)
{
// Try to open the keyboard device
- fd = std::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
+ fd = open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
Review Comment:
Since other global function doesn't add ::, I prefer to keep the current change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#discussion_r898153322
##########
graphics/nxwm/src/ckeyboard.cxx:
##########
@@ -167,7 +167,7 @@ int CKeyboard::open(void)
{
// Try to open the keyboard device
- fd = std::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
+ fd = open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
Review Comment:
Since other global functions don't add ::, I prefer to keep the current change.
##########
graphics/nxwm/src/cnxterm.cxx:
##########
@@ -489,16 +489,16 @@ int CNxTerm::nxterm(int argc, char *argv[])
std::fflush(stderr);
#ifdef CONFIG_NXTERM_NXKBDIN
- std::dup2(fd, 0);
+ dup2(fd, 0);
#endif
- std::dup2(fd, 1);
- std::dup2(fd, 2);
+ dup2(fd, 1);
+ dup2(fd, 2);
// And we can close our original driver file descriptor
if (fd > 2)
{
- std::close(fd);
+ close(fd);
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#issuecomment-1156051491
Seems like we need some more changes:
```
src/ctouchscreen.cxx: In destructor 'NxWM::CTouchscreen::~CTouchscreen()':
Error: src/ctouchscreen.cxx:105:12: error: 'close' is not a member of 'std'; did you mean 'close'?
105 | std::close(m_touchFd);
| ^~~~~
In file included from /github/workspace/sources/nuttx/include/pthread.h:34,
from src/ctouchscreen.cxx:33:
/github/workspace/sources/nuttx/include/unistd.h:327:9: note: 'close' declared here
327 | int close(int fd);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#issuecomment-1156007939
> Please remove Gerrit Change-ID
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] pkarashchenko merged pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#discussion_r897975254
##########
graphics/nxwm/src/ckeyboard.cxx:
##########
@@ -167,7 +167,7 @@ int CKeyboard::open(void)
{
// Try to open the keyboard device
- fd = std::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
+ fd = open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
Review Comment:
Yes, done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#discussion_r898153918
##########
graphics/twm4nx/apps/cnxterm.cxx:
##########
@@ -402,16 +402,16 @@ int CNxTerm::nxterm(int argc, char *argv[])
std::fflush(stderr);
#ifdef CONFIG_NXTERM_NXKBDIN
- std::dup2(fd, 0);
+ dup2(fd, 0);
#endif
- std::dup2(fd, 1);
- std::dup2(fd, 2);
+ dup2(fd, 1);
+ dup2(fd, 2);
// And we can close our original driver file descriptor
if (fd > 2)
{
- std::close(fd);
+ close(fd);
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#discussion_r897936043
##########
graphics/nxwm/src/ckeyboard.cxx:
##########
@@ -167,7 +167,7 @@ int CKeyboard::open(void)
{
// Try to open the keyboard device
- fd = std::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
+ fd = open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
Review Comment:
do we need to change `std::sleep(2);` to `sleep(2);` as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #1199: Remove the non standard c++ header file inclusion
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #1199:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1199#issuecomment-1155987391
Please remove Gerrit Change-ID
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org