summaryrefslogtreecommitdiff
path: root/src/sound.c
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2010-08-09 02:35:21 -0700
committerDan Nicolaescu <dann@ics.uci.edu>2010-08-09 02:35:21 -0700
commit8ea90aa3525a93194e98b7e1b2ea77e96ca3dde6 (patch)
treed2719f3f91a5aeac252e14e777ceea6aea06527d /src/sound.c
parent443c2c0301d7d69efa875510d7a4530573b5e76c (diff)
downloademacs-8ea90aa3525a93194e98b7e1b2ea77e96ca3dde6.tar.gz
Use const char* instead of char*.
Reduce the number of warnings with -Wwrite-strings. * src/xrdb.c (get_environ_db, get_system_name): * src/unexelf.c (find_section): * src/term.c (string_cost, string_cost_one_line, per_line_cost) (get_named_tty, init_tty): * src/sysdep.c (sys_subshell): * src/sound.c (sound_perror, sound_warning, vox_open, vox_init) (alsa_sound_perror, alsa_open, alsa_configure, alsa_init): * src/search.c (Freplace_match): * src/process.c (Fmake_network_process, send_process, init_process): * src/lread.c (Fload, init_lread): * src/keymap.c (Fdescribe_buffer_bindings, describe_map_tree): * src/keyboard.c (parse_tool_bar_item, struct event_head): * src/gtkutil.h (xg_get_font_name): * src/gtkutil.c (get_dialog_title, create_dialog, xg_get_font_name) (make_widget_for_menu_item, make_menu_item, create_menus) (xg_make_tool_item): * src/font.c (parse_matrix, font_parse_name): * src/floatfns.c (rounding_driver, float_error_fn_name): * src/filelock.c (get_boot_time_1, lock_file_1): * src/fileio.c (barf_or_query_if_file_exists, check_writable): * src/editfns.c (get_system_name, get_operating_system_release) (Fencode_time, Fset_time_zone_rule): * src/dispextern.h (string_cost, per_line_cost, get_named_tty, init_tty): * src/buffer.c (defvar_per_buffer): Use const.
Diffstat (limited to 'src/sound.c')
-rw-r--r--src/sound.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sound.c b/src/sound.c
index 2b23ae400a7..55804c328a8 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -115,10 +115,10 @@ enum sound_attr
};
#ifdef HAVE_ALSA
-static void alsa_sound_perror (char *, int) NO_RETURN;
+static void alsa_sound_perror (const char *, int) NO_RETURN;
#endif
-static void sound_perror (char *) NO_RETURN;
-static void sound_warning (char *);
+static void sound_perror (const char *) NO_RETURN;
+static void sound_warning (const char *);
static int parse_sound (Lisp_Object, Lisp_Object *);
/* END: Common Definitions */
@@ -329,7 +329,7 @@ static int do_play_sound (const char *, unsigned long);
/* Like perror, but signals an error. */
static void
-sound_perror (char *msg)
+sound_perror (const char *msg)
{
int saved_errno = errno;
@@ -347,7 +347,7 @@ sound_perror (char *msg)
/* Display a warning message. */
static void
-sound_warning (char *msg)
+sound_warning (const char *msg)
{
message (msg);
}
@@ -727,7 +727,7 @@ au_play (struct sound *s, struct sound_device *sd)
static void
vox_open (struct sound_device *sd)
{
- char *file;
+ const char *file;
/* Open the sound device. Default is /dev/dsp. */
if (sd->file)
@@ -872,7 +872,7 @@ vox_choose_format (struct sound_device *sd, struct sound *s)
static int
vox_init (struct sound_device *sd)
{
- char *file;
+ const char *file;
int fd;
/* Open the sound device. Default is /dev/dsp. */
@@ -915,7 +915,7 @@ vox_write (struct sound_device *sd, const char *buffer, int nbytes)
/* This driver is available on GNU/Linux. */
static void
-alsa_sound_perror (char *msg, int err)
+alsa_sound_perror (const char *msg, int err)
{
error ("%s: %s", msg, snd_strerror (err));
}
@@ -934,7 +934,7 @@ struct alsa_params
static void
alsa_open (struct sound_device *sd)
{
- char *file;
+ const char *file;
struct alsa_params *p;
int err;
@@ -1056,7 +1056,7 @@ alsa_configure (struct sound_device *sd)
int chn;
snd_mixer_t *handle;
snd_mixer_elem_t *e;
- char *file = sd->file ? sd->file : DEFAULT_ALSA_SOUND_DEVICE;
+ const char *file = sd->file ? sd->file : DEFAULT_ALSA_SOUND_DEVICE;
if (snd_mixer_open (&handle, 0) >= 0)
{
@@ -1220,7 +1220,7 @@ snd_error_quiet (const char *file, int line, const char *function, int err,
static int
alsa_init (struct sound_device *sd)
{
- char *file;
+ const char *file;
snd_pcm_t *handle;
int err;