diff --git a/cpp/Makefile b/cpp/Makefile index 550e11ed..18725a25 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -50,8 +50,8 @@ BOARD ?= FULLSPEC CXXFLAGS += -DBOARD_$(BOARD) -## DEVICES=LIST -## Lists of devices to build, default is all. Supported devices: +## BUILD_*=1 +## Specifies the device types to build, default is all. Supported types: ## SCHD SCSI Removable and non-removable Hard Drive ## SCCD SCSI CD-Rom Drive ## SCMO SCSI Optical Memory diff --git a/cpp/controllers/generic_controller.cpp b/cpp/controllers/generic_controller.cpp index 8244b1ca..e2271988 100644 --- a/cpp/controllers/generic_controller.cpp +++ b/cpp/controllers/generic_controller.cpp @@ -591,6 +591,8 @@ void GenericController::DataOutNonBlockOriented() const } } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool GenericController::XferIn(vector &buf) { assert(IsDataIn()); @@ -630,7 +632,10 @@ bool GenericController::XferIn(vector &buf) return true; } +#pragma GCC diagnostic pop +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool GenericController::XferOutBlockOriented(bool cont) { auto device = GetDeviceForLun(GetEffectiveLun()); @@ -728,6 +733,7 @@ bool GenericController::XferOutBlockOriented(bool cont) return true; } +#pragma GCC diagnostic pop void GenericController::ProcessCommand() { diff --git a/cpp/shared_command/command_executor.cpp b/cpp/shared_command/command_executor.cpp index 211f6dca..91f2bf5a 100644 --- a/cpp/shared_command/command_executor.cpp +++ b/cpp/shared_command/command_executor.cpp @@ -282,6 +282,8 @@ bool CommandExecutor::Attach(const CommandContext &context, const PbDeviceDefini return true; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool CommandExecutor::Insert(const CommandContext &context, const PbDeviceDefinition &pb_device, const shared_ptr &device, bool dryRun) const { @@ -327,6 +329,7 @@ bool CommandExecutor::Insert(const CommandContext &context, const PbDeviceDefini return true; } +#pragma GCC diagnostic pop bool CommandExecutor::Detach(const CommandContext &context, PrimaryDevice &device, bool dryRun) const { @@ -396,6 +399,8 @@ string CommandExecutor::SetReservedIds(string_view ids) return ""; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool CommandExecutor::ValidateImageFile(const CommandContext &context, StorageDevice &storage_device, const string &filename) const { @@ -431,7 +436,10 @@ bool CommandExecutor::ValidateImageFile(const CommandContext &context, StorageDe return true; } +#pragma GCC diagnostic pop +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool CommandExecutor::CheckForReservedFile(const CommandContext &context, const string &filename) { #ifdef BUILD_DISK @@ -443,6 +451,7 @@ bool CommandExecutor::CheckForReservedFile(const CommandContext &context, const return true; } +#pragma GCC diagnostic pop string CommandExecutor::PrintCommand(const PbCommand &command, const PbDeviceDefinition &pb_device) const { @@ -545,6 +554,8 @@ shared_ptr CommandExecutor::CreateDevice(const CommandContext &co return device; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool CommandExecutor::SetSectorSize(const CommandContext &context, shared_ptr device, int size) const { #ifdef BUILD_DISK @@ -564,6 +575,7 @@ bool CommandExecutor::SetSectorSize(const CommandContext &context, shared_ptr device, PbDevice &pb_device, const string &default_folder) const { pb_device.set_id(device->GetId()); @@ -108,6 +110,7 @@ void CommandResponse::GetDevice(shared_ptr device, PbDevice &pb_device, } #endif } +#pragma GCC diagnostic pop bool CommandResponse::GetImageFile(PbImageFile &image_file, const string &default_folder, const string &filename) const { diff --git a/cpp/shared_command/image_support.cpp b/cpp/shared_command/image_support.cpp index 4ffcb2fc..78bcbf6c 100644 --- a/cpp/shared_command/image_support.cpp +++ b/cpp/shared_command/image_support.cpp @@ -296,6 +296,8 @@ bool S2pImage::SetImagePermissions(const CommandContext &context) const return context.ReturnSuccessStatus(); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" bool S2pImage::IsReservedFile(const CommandContext &context, const string &file, const string &op) { #ifdef BUILD_DISK @@ -310,6 +312,7 @@ bool S2pImage::IsReservedFile(const CommandContext &context, const string &file, return false; #endif } +#pragma GCC diagnostic pop bool S2pImage::ValidateParams(const CommandContext &context, const string &op, string &from, string &to) const {