You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/11/07 20:38:28 UTC

[incubator-nuttx-apps] branch master updated (f85a6b6fb -> dbc757d79)

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


    from f85a6b6fb Added poweroff in fs and mm tests.
     new 8554db0b5 Fix slcd_trapezoids.cxx:38:5: error: array designators are a C99 extension
     new 1f78f8a9c Fix Error: src/cscaledbitmap.cxx:456:26: error: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true
     new e1cc1199b Fix error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?
     new a95d34c34 Fix error: 'NXWidgets::CTextBox::insertText' hides overloaded virtual functio
     new 56da7efc5 Fix error: struct 'CWindow' was previously declared as a class
     new 7bc1c17ec Fix error: private field 'm_stop' is not used
     new dbc757d79 Fix error: 'CTouchscreen' defined as a class here but previously declared as a struct

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 graphics/nxwidgets/src/cgraphicsport.cxx |  8 ++++----
 graphics/nxwidgets/src/cimage.cxx        |  4 ++--
 graphics/nxwidgets/src/clabel.cxx        |  2 +-
 graphics/nxwidgets/src/cscaledbitmap.cxx |  2 +-
 graphics/slcd/slcd_trapezoids.cxx        | 31 -------------------------------
 include/graphics/nxwidgets/clabel.hxx    |  2 +-
 include/graphics/nxwm/ccalibration.hxx   |  3 +--
 include/graphics/twm4nx/ciconmgr.hxx     |  2 +-
 8 files changed, 11 insertions(+), 43 deletions(-)


[incubator-nuttx-apps] 02/07: Fix Error: src/cscaledbitmap.cxx:456:26: error: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 1f78f8a9c601fff26c0ca3327fd428486a7715ff
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 18:47:40 2022 +0800

    Fix Error: src/cscaledbitmap.cxx:456:26: error: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 graphics/nxwidgets/src/cscaledbitmap.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/graphics/nxwidgets/src/cscaledbitmap.cxx b/graphics/nxwidgets/src/cscaledbitmap.cxx
index 063e0e3eb..351575843 100644
--- a/graphics/nxwidgets/src/cscaledbitmap.cxx
+++ b/graphics/nxwidgets/src/cscaledbitmap.cxx
@@ -433,7 +433,7 @@ bool CScaledBitmap::scaleColor(FAR const struct rgbcolor_s &incolor1,
                                FAR const struct rgbcolor_s &incolor2,
                                b16_t fraction, FAR struct rgbcolor_s &outcolor)
 {
-  uint8_t component;
+  uint32_t component;
   b16_t red;
   b16_t green;
   b16_t blue;


[incubator-nuttx-apps] 01/07: Fix slcd_trapezoids.cxx:38:5: error: array designators are a C99 extension

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 8554db0b5eede359432b3d4e8343bb61b6d6a864
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 18:36:00 2022 +0800

    Fix slcd_trapezoids.cxx:38:5: error: array designators are a C99 extension
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 graphics/slcd/slcd_trapezoids.cxx | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/graphics/slcd/slcd_trapezoids.cxx b/graphics/slcd/slcd_trapezoids.cxx
index c4c6a2f9e..a36b17708 100644
--- a/graphics/slcd/slcd_trapezoids.cxx
+++ b/graphics/slcd/slcd_trapezoids.cxx
@@ -35,25 +35,21 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GTop_Runs[NTOP_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 11703,
       .rightx = 31208,
       .y      = 0
     },
-    [1]       =
     {
       .leftx  = 8972,
       .rightx = 27323,
       .y      = 780
     },
-    [2]       =
     {
       .leftx  = 9655,
       .rightx = 34328,
       .y      = 1560
     },
-    [3]       =
     {
       .leftx  = 14434,
       .rightx = 28867,
@@ -65,25 +61,21 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GTopLeft_Runs[NTOPLEFT_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 7022,
       .rightx = 7022,
       .y      = 2341
     },
-    [1]       =
     {
       .leftx  = 5461,
       .rightx = 9362,
       .y      = 4681
     },
-    [2]       =
     {
       .leftx  = 5098,
       .rightx = 12873,
       .y      = 8192
     },
-    [3]       =
     {
       .leftx  = 3193,
       .rightx = 10923,
@@ -107,37 +99,31 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GTopRight_Runs[NTOPRIGHT_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 37059,
       .rightx = 37059,
       .y      = 3901
     },
-    [1]       =
     {
       .leftx  = 33997,
       .rightx = 37839,
       .y      = 6242
     },
-    [2]       =
     {
       .leftx  = 30427,
       .rightx = 37591,
       .y      = 8972
     },
-    [3]       =
     {
       .leftx  = 28477,
       .rightx = 35924,
       .y      = 27307
     },
-    [4]       =
     {
       .leftx  = 28518,
       .rightx = 35889,
       .y      = 27697
     },
-    [5]       =
     {
       .leftx  = 32378,
       .rightx = 32378,
@@ -149,19 +135,16 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GMiddle_Runs[NMIDDLE_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 12483,
       .rightx = 27307,
       .y      = 28867
     },
-    [1]       =
     {
       .leftx  = 8192,
       .rightx = 30427,
       .y      = 32378
     },
-    [2]       =
     {
       .leftx  = 11703,
       .rightx = 25746,
@@ -173,32 +156,27 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GBottomLeft_Runs[NBOTTOMLEFT_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 5851,
       .rightx = 5851,
       .y      = 33938
     ,
     },
-    [1]       =
     {
       .leftx  = 1950,
       .rightx = 9752,
       .y      = 37449
     },
-    [2]       =
     {
       .leftx  = 370,
       .rightx = 8192,
       .y      = 55784
     },
-    [3]       =
     {
       .leftx  = 0,
       .rightx = 3364,
       .y      = 60075
     },
-    [4]       =
     {
       .leftx  = 1170,
       .rightx = 1170,
@@ -210,37 +188,31 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GBottomRight_Runs[NBOTTOMRIGHT_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 31988,
       .rightx = 31988,
       .y      = 34328
     },
-    [1]       =
     {
       .leftx  = 28769,
       .rightx = 35109,
       .y      = 37059
     },
-    [2]       =
     {
       .leftx  = 27307,
       .rightx = 34996,
       .y      = 38229
     },
-    [3]       =
     {
       .leftx  = 25746,
       .rightx = 33183,
       .y      = 56954
     },
-    [4]       =
     {
       .leftx  = 30324,
       .rightx = 32768,
       .y      = 61245
     },
-    [5]       =
     {
       .leftx  = 31988,
       .rightx = 31988,
@@ -252,19 +224,16 @@ namespace SLcd
 
   const struct SLcdTrapezoidRun GBottom_Runs[NBOTTOM_TRAPEZOIDS + 1] =
   {
-    [0]       =
     {
       .leftx  = 9362,
       .rightx = 24576,
       .y      = 58124
     },
-    [1]       =
     {
       .leftx  = 2731,
       .rightx = 31988,
       .y      = 63976
     },
-    [2]       =
     {
       .leftx  = 4681,
       .rightx = 28477,


[incubator-nuttx-apps] 03/07: Fix error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit e1cc1199bbea7597ba7134a7170fe14c2e606632
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 18:43:20 2022 +0800

    Fix error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 graphics/nxwidgets/src/cgraphicsport.cxx | 8 ++++----
 graphics/nxwidgets/src/cimage.cxx        | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/graphics/nxwidgets/src/cgraphicsport.cxx b/graphics/nxwidgets/src/cgraphicsport.cxx
index cac72d395..0b72d0f61 100644
--- a/graphics/nxwidgets/src/cgraphicsport.cxx
+++ b/graphics/nxwidgets/src/cgraphicsport.cxx
@@ -579,7 +579,7 @@ void CGraphicsPort::drawBitmapGreyScale(nxgl_coord_t x, nxgl_coord_t y,
        src += bitmap->stride;
     }
 
-  delete run;
+  delete[] run;
 }
 
 /**
@@ -824,7 +824,7 @@ void CGraphicsPort::_drawText(struct nxgl_point_s *pos, CRect *bound,
       pos->x += fontWidth;
     }
 
-  delete glyph;
+  delete[] glyph;
 }
 
 /**
@@ -962,7 +962,7 @@ void CGraphicsPort::greyScale(nxgl_coord_t x, nxgl_coord_t y,
                        &origin, rowBitmap.stride) ;
     }
 
-  delete rowBuffer;
+  delete[] rowBuffer;
 }
 
 /**
@@ -1038,5 +1038,5 @@ void CGraphicsPort::invert(nxgl_coord_t x, nxgl_coord_t y,
                        &origin, rowBitmap.stride) ;
     }
 
-  delete rowBuffer;
+  delete[] rowBuffer;
 };
diff --git a/graphics/nxwidgets/src/cimage.cxx b/graphics/nxwidgets/src/cimage.cxx
index da33a690e..4b02a8bd9 100644
--- a/graphics/nxwidgets/src/cimage.cxx
+++ b/graphics/nxwidgets/src/cimage.cxx
@@ -254,7 +254,7 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
           if (!m_bitmap->getRun(0, srcRow, nLeftPixels, &buffer[m_origin.x]))
             {
               ginfo("IBitmap::getRun failed at image row %d\n", srcRow);
-              delete buffer;
+              delete[] buffer;
               return;
             }
 
@@ -325,7 +325,7 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
         }
     }
 
-   delete buffer;
+   delete[] buffer;
 }
 
 /**


[incubator-nuttx-apps] 04/07: Fix error: 'NXWidgets::CTextBox::insertText' hides overloaded virtual functio

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit a95d34c3469bb29fbc140f741bb2c9cdf962c5cc
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 18:57:36 2022 +0800

    Fix error: 'NXWidgets::CTextBox::insertText' hides overloaded virtual functio
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 graphics/nxwidgets/src/clabel.cxx     | 2 +-
 include/graphics/nxwidgets/clabel.hxx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/graphics/nxwidgets/src/clabel.cxx b/graphics/nxwidgets/src/clabel.cxx
index 2523e1084..f07a69b7b 100644
--- a/graphics/nxwidgets/src/clabel.cxx
+++ b/graphics/nxwidgets/src/clabel.cxx
@@ -179,7 +179,7 @@ void CLabel::appendText(const CNxString &text)
  * @param index Index at which to insert the text.
  */
 
-void CLabel::insertText(const CNxString &text, const int index)
+void CLabel::insertText(const CNxString &text, const unsigned int index)
 {
   m_text.insert(text, index);
   onTextChange();
diff --git a/include/graphics/nxwidgets/clabel.hxx b/include/graphics/nxwidgets/clabel.hxx
index 91bcdde76..d5cc5da36 100644
--- a/include/graphics/nxwidgets/clabel.hxx
+++ b/include/graphics/nxwidgets/clabel.hxx
@@ -285,7 +285,7 @@ namespace NXWidgets
      * @param index Index at which to insert the text.
      */
 
-    virtual void insertText(const CNxString &text, const int index);
+    virtual void insertText(const CNxString &text, const unsigned int index);
 
     /**
      * Control the highlight state.


[incubator-nuttx-apps] 06/07: Fix error: private field 'm_stop' is not used

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 7bc1c17ecd020cb9f28f24c4b1db3105f8f8a5cd
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 21:48:51 2022 +0800

    Fix error: private field 'm_stop' is not used
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/graphics/nxwm/ccalibration.hxx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/graphics/nxwm/ccalibration.hxx b/include/graphics/nxwm/ccalibration.hxx
index 3e6251f53..d76066333 100644
--- a/include/graphics/nxwm/ccalibration.hxx
+++ b/include/graphics/nxwm/ccalibration.hxx
@@ -164,7 +164,6 @@ namespace NxWM
     struct nxgl_point_s        m_touchPos;        /**< This is the last touch position */
     volatile uint8_t           m_calthread;       /**< Current calibration display state (See ECalibThreadState)*/
     uint8_t                    m_calphase;        /**< Current calibration display state (See ECalibrationPhase)*/
-    bool                       m_stop;            /**< True: We have been asked to stop the calibration */
     bool                       m_touched;         /**< True: The screen is touched */
     uint8_t                    m_touchId;         /**< The ID of the touch */
 #ifdef CONFIG_NXWM_CALIBRATION_AVERAGE


[incubator-nuttx-apps] 07/07: Fix error: 'CTouchscreen' defined as a class here but previously declared as a struct

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit dbc757d79dfc1ac15878e19cc321fbf9e8884a88
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 21:47:34 2022 +0800

    Fix error: 'CTouchscreen' defined as a class here but previously declared as a struct
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/graphics/nxwm/ccalibration.hxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/graphics/nxwm/ccalibration.hxx b/include/graphics/nxwm/ccalibration.hxx
index d76066333..2417f7fe0 100644
--- a/include/graphics/nxwm/ccalibration.hxx
+++ b/include/graphics/nxwm/ccalibration.hxx
@@ -64,7 +64,7 @@ namespace NxWM
    * Forward references
    */
 
-  struct CTouchscreen;
+  class CTouchscreen;
 
   /**
    * Touchscreen calibration data


[incubator-nuttx-apps] 05/07: Fix error: struct 'CWindow' was previously declared as a class

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 56da7efc57cd8005f9b944a1a1e5ccbf3ed0709c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 4 19:00:51 2022 +0800

    Fix error: struct 'CWindow' was previously declared as a class
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/graphics/twm4nx/ciconmgr.hxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/graphics/twm4nx/ciconmgr.hxx b/include/graphics/twm4nx/ciconmgr.hxx
index 82203b187..766f29c0a 100644
--- a/include/graphics/twm4nx/ciconmgr.hxx
+++ b/include/graphics/twm4nx/ciconmgr.hxx
@@ -77,7 +77,7 @@ namespace Twm4Nx
       NXWidgets::CNxString            m_name;       /**< The Icon Manager name */
       FAR struct SWindowEntry        *m_head;       /**< Head of the window list */
       FAR struct SWindowEntry        *m_tail;       /**< Tail of the window list */
-      FAR struct CWindow             *m_window;     /**< Parent window */
+      FAR CWindow                    *m_window;     /**< Parent window */
       FAR NXWidgets::CButtonArray    *m_buttons;    /**< The contained button array */
       uint16_t                        m_nWindows;   /**< The number of windows in the icon mgr. */
       uint8_t                         m_nColumns;   /**< Fixed number of columns per row */