Performing a no-effect access to the variable, for example by casting it to void, works fine to suppress the "set but not used" warning in gcc.
For example, this gives warning: variable 'c' set but not used [-Wunused-but-set-variable]
char c;
c = 0;
Whereas this gives no warnings:
char c;
c = 0;
(void)c; // suppress warning
You can also do it all in one go, although it is a little less clear:
char c;
(void)(c = 0);
But perhaps you can avoid the problem altogether. You say:
the hardware requires a register read to set conditions in the peripheral, even though the data isn't used
so it sounds like you are actually doing something like this:
char c;
volatile char *p = REGISTER_ADDRESS;
c = *p; // read register to clear hardware
(void)c; // suppress warning
when you could probably just do this:
volatile char *p = REGISTER_ADDRESS;
*p; // read register to clear hardware
Note that you need the volatile type qualifier to prevent the access being optimised away. You will get a "statement has no effect" warning without it (unless you suppress that with a cast to void also).