Fix 185 -Wdiscarded-qualifiers warnings

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith
2024-01-05 17:01:50 -08:00
parent 13a26918d8
commit f52912d062
3 changed files with 8 additions and 7 deletions

View File

@@ -97,8 +97,8 @@ Atom prop_product_id = 0;
Atom prop_device_node = 0;
static Atom
InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues,
int *values)
InitTypedAtom(DeviceIntPtr dev, const char *name, Atom type, int format,
int nvalues, int *values)
{
int i;
Atom atom;
@@ -142,13 +142,14 @@ InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues,
}
static Atom
InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
InitAtom(DeviceIntPtr dev, const char *name, int format,
int nvalues, int *values)
{
return InitTypedAtom(dev, name, XA_INTEGER, format, nvalues, values);
}
static Atom
InitFloatAtom(DeviceIntPtr dev, char *name, int nvalues, float *values)
InitFloatAtom(DeviceIntPtr dev, const char *name, int nvalues, float *values)
{
Atom atom;

View File

@@ -465,7 +465,7 @@ SynapticsIsSoftButtonAreasValid(int *values)
}
static void
set_softbutton_areas_option(InputInfoPtr pInfo, char *option_name, int offset)
set_softbutton_areas_option(InputInfoPtr pInfo, const char *option_name, int offset)
{
SynapticsPrivate *priv = pInfo->private;
SynapticsParameters *pars = &priv->synpara;

View File

@@ -65,11 +65,11 @@ enum ParaType {
};
struct Parameter {
char *name; /* Name of parameter */
const char *name; /* Name of parameter */
enum ParaType type; /* Type of parameter */
double min_val; /* Minimum allowed value */
double max_val; /* Maximum allowed value */
char *prop_name; /* Property name */
const char *prop_name; /* Property name */
int prop_format; /* Property format (0 for floats) */
int prop_offset; /* Offset inside property */
};