Annoying warnings on Windows build (engine/Port.hpp)

in Rack/include/engine/Port.hpp I inserted the following pragma directives to get rid of the warnings

	void setChannels(int channels) {
		// If disconnected, keep the number of channels at 0.
		if (this->channels == 0) {
			return;
		}
		// Set higher channel voltages to 0
		for (int c = channels; c < this->channels; c++) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
			voltages[c] = 0.f;
#pragma GCC diagnostic pop
		}
		// Don't allow caller to set port as disconnected
		if (channels == 0) {
			channels = 1;
		}
		this->channels = channels;
	}
3 Likes