Skip to content

Commit

Permalink
resolving c++ linter
Browse files Browse the repository at this point in the history
Add #include <XXXXXX> for XXXXXX  [build/include_what_you_use] [4]
  • Loading branch information
ruck314 committed Oct 16, 2024
1 parent 89ca11c commit b4b6fed
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/rogue/interfaces/memory/Variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#include <iostream>
#include <memory>
#include <sstream>
#include <vector>
#include <cstdio>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <inttypes.h>

#include <memory>
#include <cstdio>

#include "rogue/GeneralError.h"
#include "rogue/interfaces/stream/Frame.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/Frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <inttypes.h>

#include <memory>
#include <cstdio>

#include "rogue/GeneralError.h"
#include "rogue/interfaces/stream/Buffer.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/Master.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <unistd.h>

#include <memory>
#include <vector>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/RateDrop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <sys/time.h>

#include <memory>
#include <cstdio>

#include "rogue/Logging.h"
#include "rogue/interfaces/stream/Frame.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/Slave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <memory>
#include <string>
#include <cstdio>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/TcpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <zmq.h>

#include <memory>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/TcpCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <zmq.h>

#include <memory>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/interfaces/stream/TcpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <zmq.h>

#include <memory>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
2 changes: 2 additions & 0 deletions src/rogue/protocols/rssi/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#include <cmath>
#include <memory>
#include <map>
#include <utility>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/protocols/rssi/Header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <iostream>
#include <memory>
#include <sstream>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/protocols/udp/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <unistd.h>

#include <memory>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
2 changes: 2 additions & 0 deletions src/rogue/protocols/xilinx/JtagDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <sys/socket.h>

#include <string>
#include <memory>
#include <cstdio>

namespace rpx = rogue::protocols::xilinx;

Expand Down
2 changes: 2 additions & 0 deletions src/rogue/protocols/xilinx/Xvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <unistd.h>

#include <cstring>
#include <memory>
#include <algorithm>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
2 changes: 2 additions & 0 deletions src/rogue/protocols/xilinx/XvcConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include <netinet/tcp.h>
#include <sys/select.h>

#include <cstdio>

namespace rpx = rogue::protocols::xilinx;

rpx::XvcConnection::XvcConnection(int sd, JtagDriver* drv, uint64_t maxVecLen)
Expand Down
1 change: 1 addition & 0 deletions src/rogue/utilities/Prbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <unistd.h>

#include <memory>
#include <cstdio>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/utilities/fileio/LegacyStreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <iostream>
#include <memory>
#include <thread>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
1 change: 1 addition & 0 deletions src/rogue/utilities/fileio/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <memory>
#include <thread>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down
6 changes: 4 additions & 2 deletions src/rogue/utilities/fileio/StreamWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include <cstring>
#include <memory>
#include <thread>
#include <map>
#include <string>

#include "rogue/GeneralError.h"
#include "rogue/GilRelease.h"
Expand Down Expand Up @@ -298,7 +300,7 @@ void ruf::StreamWriter::intWrite(void* data, uint32_t size) {
// Attempted write is larger than buffer, raw write
// This is called if buffer is disabled
if (size > buffSize_) {
if (write(fd_, data, size) != (int32_t)size) {
if (write(fd_, data, size) != static_cast<int32_t>(size)) {
::close(fd_);
fd_ = -1;
log_->error("Write failed, closing file!");
Expand Down Expand Up @@ -347,7 +349,7 @@ void ruf::StreamWriter::checkSize(uint32_t size) {
//! Flush file
void ruf::StreamWriter::flush() {
if (currBuffer_ > 0) {
if (write(fd_, buffer_, currBuffer_) != (int32_t)currBuffer_) {
if (write(fd_, buffer_, currBuffer_) != static_cast<int32_t>(currBuffer_)) {
::close(fd_);
fd_ = -1;
log_->error("Write failed, closing file!");
Expand Down
3 changes: 3 additions & 0 deletions tests/api_test/src/api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#include "rogue/interfaces/api/Bsp.h"

#include <string>
#include <cstdio>

void varListener(std::string path, std::string value) {
printf("Var Listener: %s = %s\n", path.c_str(), value.c_str());
}
Expand Down

0 comments on commit b4b6fed

Please sign in to comment.