target/target.c: fixed rp check bug in asynchronous flash write algorithm.
[fw/openocd] / src / target / arm_semihosting.c
index 65fd18893a7a50f0701ebd668399e9abe093effb..21b7809c285b04d09294df1c8606e6cfdec67e00 100644 (file)
@@ -18,7 +18,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
  ***************************************************************************/
 
 /**
@@ -48,7 +48,7 @@
 #include <helper/log.h>
 #include <sys/stat.h>
 
-static int open_modeflags[12] = {
+static const int open_modeflags[12] = {
        O_RDONLY,
        O_RDONLY | O_BINARY,
        O_RDWR,
@@ -323,7 +323,7 @@ static int do_semihosting(struct target *target)
                        if (l < s)
                                result = -1;
                        else {
-                               retval = target_write_buffer(target, a, s, (void *)arg);
+                               retval = target_write_buffer(target, a, s, (uint8_t *)arg);
                                if (retval != ERROR_OK)
                                        return retval;
                                result = 0;