From b1db4ec521ced6df13a131ad070858c3dc422dc8 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 29 Sep 2011 23:13:09 +0200 Subject: [PATCH 1/1] kinect_upload_fw: fix assigning a string literal to a 'char *' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit kinect_upload_fw.c:118:19: error: initialization discards ‘const’ qualifier from pointer target type A string literals can be seen as "const char *" or as array of chars, I like the second interpretation better. --- kinect_upload_fw/kinect_upload_fw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kinect_upload_fw/kinect_upload_fw.c b/kinect_upload_fw/kinect_upload_fw.c index 3a22d5c..da909d5 100644 --- a/kinect_upload_fw/kinect_upload_fw.c +++ b/kinect_upload_fw/kinect_upload_fw.c @@ -115,7 +115,8 @@ static int get_reply(void) { } int main(int argc, char** argv) { - char* filename = "firmware.bin"; + char default_filename[] = "firmware.bin"; + char* filename = default_filename; if (argc == 2) { filename = argv[1]; } -- 2.1.4