Throwing in some 'const' declarations will stop the compiler warnings:
#include "Arduino.h"
void doSomethingWith(char const **);
void setup() {
Serial.begin(115200);
delay(2000);
char const *array2[] = { "alpha", "Baker", "charlie", "delta", nullptr };
doSomethingWith(array2);
}
void loop() {
}
void doSomethingWith(char const **ar) {
while (**ar) {
Serial.println(*ar);
ar++;
}
}