Bug 562613 – Missing const modifier in string parameters
authorAlexander Larsson <alexl@redhat.com>
Tue, 3 Mar 2009 15:50:13 +0000 (15:50 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Tue, 3 Mar 2009 15:50:13 +0000 (15:50 +0000)
2009-03-03  Alexander Larsson  <alexl@redhat.com>

Bug 562613 – Missing const modifier in string parameters

        * gfileinputstream.[ch]:
        * gfileoutputstream.[ch]:
        * glocalfileinfo.[ch]:
Make string arguments const if used as such.

svn path=/trunk/; revision=7952

gio/ChangeLog
gio/gfileinputstream.c
gio/gfileinputstream.h
gio/gfileoutputstream.c
gio/gfileoutputstream.h
gio/glocalfileinfo.c
gio/glocalfileinfo.h

index c9f7269..d3fb320 100644 (file)
@@ -1,5 +1,14 @@
 2009-03-03  Alexander Larsson  <alexl@redhat.com>
 
+       Bug 562613 – Missing const modifier in string parameters
+
+        * gfileinputstream.[ch]:
+        * gfileoutputstream.[ch]:
+        * glocalfileinfo.[ch]:
+       Make string arguments const if used as such.
+
+2009-03-03  Alexander Larsson  <alexl@redhat.com>
+
        * glocalfile.c (g_local_file_query_filesystem_info):
        Handle filesystems no supporting reporting how much is free.
        This fixes bug 573454 where the filesystem not supporting this
index c3afd00..0493f38 100644 (file)
@@ -66,7 +66,7 @@ static gboolean   g_file_input_stream_seekable_truncate      (GSeekable
                                                              GCancellable         *cancellable,
                                                              GError              **error);
 static void       g_file_input_stream_real_query_info_async  (GFileInputStream     *stream,
-                                                             char                 *attributes,
+                                                             const char           *attributes,
                                                              int                   io_priority,
                                                              GCancellable         *cancellable,
                                                              GAsyncReadyCallback   callback,
@@ -129,7 +129,7 @@ g_file_input_stream_init (GFileInputStream *stream)
  **/
 GFileInfo *
 g_file_input_stream_query_info (GFileInputStream  *stream,
-                                char              *attributes,
+                                const char        *attributes,
                                 GCancellable      *cancellable,
                                 GError           **error)
 {
@@ -202,7 +202,7 @@ async_ready_callback_wrapper (GObject      *source_object,
  **/
 void
 g_file_input_stream_query_info_async (GFileInputStream    *stream,
-                                      char                *attributes,
+                                      const char          *attributes,
                                       int                  io_priority,
                                       GCancellable        *cancellable,
                                       GAsyncReadyCallback  callback,
@@ -434,7 +434,7 @@ query_info_async_thread (GSimpleAsyncResult *res,
 
 static void
 g_file_input_stream_real_query_info_async (GFileInputStream    *stream,
-                                           char                *attributes,
+                                           const char          *attributes,
                                            int                  io_priority,
                                            GCancellable        *cancellable,
                                            GAsyncReadyCallback  callback,
index 86ceb65..3c162c7 100644 (file)
@@ -69,11 +69,11 @@ struct _GFileInputStreamClass
                                      GCancellable         *cancellable,
                                      GError              **error);
   GFileInfo * (* query_info)        (GFileInputStream     *stream,
-                                     char                 *attributes,
+                                     const char           *attributes,
                                      GCancellable         *cancellable,
                                      GError              **error);
   void        (* query_info_async)  (GFileInputStream     *stream,
-                                     char                 *attributes,
+                                     const char           *attributes,
                                      int                   io_priority,
                                      GCancellable         *cancellable,
                                      GAsyncReadyCallback   callback,
@@ -94,11 +94,11 @@ struct _GFileInputStreamClass
 GType      g_file_input_stream_get_type          (void) G_GNUC_CONST;
 
 GFileInfo *g_file_input_stream_query_info        (GFileInputStream     *stream,
-                                                 char                 *attributes,
+                                                 const char           *attributes,
                                                  GCancellable         *cancellable,
                                                  GError              **error);
 void       g_file_input_stream_query_info_async  (GFileInputStream     *stream,
-                                                 char                 *attributes,
+                                                 const char           *attributes,
                                                  int                   io_priority,
                                                  GCancellable         *cancellable,
                                                  GAsyncReadyCallback   callback,
index 7dea32c..494734c 100644 (file)
@@ -70,7 +70,7 @@ static gboolean   g_file_output_stream_seekable_truncate      (GSeekable
                                                               GCancellable         *cancellable,
                                                               GError              **error);
 static void       g_file_output_stream_real_query_info_async  (GFileOutputStream    *stream,
-                                                              char                 *attributes,
+                                                              const char           *attributes,
                                                               int                   io_priority,
                                                               GCancellable         *cancellable,
                                                               GAsyncReadyCallback   callback,
@@ -143,7 +143,7 @@ g_file_output_stream_init (GFileOutputStream *stream)
  **/
 GFileInfo *
 g_file_output_stream_query_info (GFileOutputStream      *stream,
-                                   char                   *attributes,
+                                   const char             *attributes,
                                    GCancellable           *cancellable,
                                    GError                **error)
 {
@@ -211,7 +211,7 @@ async_ready_callback_wrapper (GObject *source_object,
  **/
 void
 g_file_output_stream_query_info_async (GFileOutputStream     *stream,
-                                         char                 *attributes,
+                                         const char           *attributes,
                                          int                   io_priority,
                                          GCancellable         *cancellable,
                                          GAsyncReadyCallback   callback,
@@ -536,7 +536,7 @@ query_info_async_thread (GSimpleAsyncResult *res,
 
 static void
 g_file_output_stream_real_query_info_async (GFileOutputStream     *stream,
-                                              char                 *attributes,
+                                              const char           *attributes,
                                               int                   io_priority,
                                               GCancellable         *cancellable,
                                               GAsyncReadyCallback   callback,
index aa287f4..b2c27f5 100644 (file)
@@ -74,11 +74,11 @@ struct _GFileOutputStreamClass
                                      GCancellable         *cancellable,
                                      GError              **error);
   GFileInfo * (* query_info)        (GFileOutputStream    *stream,
-                                     char                 *attributes,
+                                     const char           *attributes,
                                      GCancellable         *cancellable,
                                      GError              **error);
   void        (* query_info_async)  (GFileOutputStream     *stream,
-                                     char                 *attributes,
+                                     const char            *attributes,
                                      int                   io_priority,
                                      GCancellable         *cancellable,
                                      GAsyncReadyCallback   callback,
@@ -100,11 +100,11 @@ GType      g_file_output_stream_get_type          (void) G_GNUC_CONST;
 
 
 GFileInfo *g_file_output_stream_query_info        (GFileOutputStream    *stream,
-                                                   char                 *attributes,
+                                                   const char           *attributes,
                                                    GCancellable         *cancellable,
                                                    GError              **error);
 void       g_file_output_stream_query_info_async  (GFileOutputStream    *stream,
-                                                  char                 *attributes,
+                                                  const char           *attributes,
                                                   int                   io_priority,
                                                   GCancellable         *cancellable,
                                                   GAsyncReadyCallback   callback,
index 8cbfcf1..f23b16c 100644 (file)
@@ -1681,9 +1681,9 @@ _g_local_file_info_get (const char             *basename,
 }
 
 GFileInfo *
-_g_local_file_info_get_from_fd (int      fd,
-                               char    *attributes,
-                               GError **error)
+_g_local_file_info_get_from_fd (int         fd,
+                               const char *attributes,
+                               GError    **error)
 {
   GLocalFileStat stat_buf;
   GFileAttributeMatcher *matcher;
index f30512e..29ccfc0 100644 (file)
@@ -60,7 +60,7 @@ GFileInfo *_g_local_file_info_get             (const char             *basename,
                                                GLocalParentFileInfo   *parent_info,
                                                GError                **error);
 GFileInfo *_g_local_file_info_get_from_fd     (int                     fd,
-                                               char                   *attributes,
+                                               const char             *attributes,
                                                GError                **error);
 char *     _g_local_file_info_create_etag     (GLocalFileStat         *statbuf);
 gboolean   _g_local_file_info_set_attribute   (char                   *filename,