Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:689c997b57bb, committed 2020-04-30
- Comitter:
- WiredHome
- Date:
- Thu Apr 30 14:27:05 2020 +0000
- Parent:
- 0:6339b3e34014
- Commit message:
- Code cleanup
Changed in this revision
| FlashFileSystem.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6339b3e34014 -r 689c997b57bb FlashFileSystem.cpp
--- a/FlashFileSystem.cpp Sat Jul 29 12:45:09 2017 +0000
+++ b/FlashFileSystem.cpp Thu Apr 30 14:27:05 2020 +0000
@@ -27,9 +27,9 @@
// INFO("Stuff to show %d", var); // new-line is automatically appended
//
#if (defined(DEBUG) && !defined(TARGET_LPC11U24))
-#define INFO(x, ...) std::printf("[INF %s %4d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__);
-#define WARN(x, ...) std::printf("[WRN %s %4d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__);
-#define ERR(x, ...) std::printf("[ERR %s %4d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__);
+#define INFO(x, ...) std::printf("[INF %s %4d] " x "\r\n", DEBUG, __LINE__, ##__VA_ARGS__);
+#define WARN(x, ...) std::printf("[WRN %s %4d] " x "\r\n", DEBUG, __LINE__, ##__VA_ARGS__);
+#define ERR(x, ...) std::printf("[ERR %s %4d] " x "\r\n", DEBUG, __LINE__, ##__VA_ARGS__);
static void HexDump(const char * title, const uint8_t * p, int count)
{
int i;
@@ -166,7 +166,7 @@
*/
off_t FlashFileSystemFileHandle::lseek(off_t offset, int whence)
{
- INFO("lseek(%d, %d)", offset, whence);
+ INFO("lseek(%ld, %d)", offset, whence);
switch(whence) {
case SEEK_SET:
m_pCurr = m_pFileStart + offset;
@@ -372,7 +372,7 @@
assert ( NULL != pLocation &&
pLocation > m_pFirstFileEntry &&
- (pLocation - m_pFirstFileEntry) < m_FileEntriesLeft );
+ (unsigned int)(pLocation - m_pFirstFileEntry) < m_FileEntriesLeft );
m_pCurrentFileEntry = pLocation;
}
@@ -453,7 +453,7 @@
pCurr = (char *)pFlashDrive;
}
if (((unsigned int)pCurr & 0x3) != 0) {
- INFO("File system image at address %08X isn't 4-byte aligned.", pCurr);
+ INFO("File system image at address %p isn't 4-byte aligned.", pCurr);
return;
}