Giter Club home page Giter Club logo

Comments (8)

cnlohr avatar cnlohr commented on August 15, 2024

All good catches. I will fix 'em tomorrow.

from ch32v003fun.

maxgerhardt avatar maxgerhardt commented on August 15, 2024

Latest commits fix all these issues in libc per 8501baa, only minor ones remain

In file included from ch32v003evt/ch32v00x.h:2396,
                 from ch32v003evt/startup_ch32v003.c:8:
ch32v003evt/ch32v00x_conf.h:1784:13: warning: 'DelaySysTick' defined but not used [-Wunused-function]
 static void DelaySysTick( uint32_t n )
             ^~~~~~~~~~~~
Compiling .pio/build/ws2812demo/src/examples/ws2812demo/ws2812bdemo.o
examples/ws2812demo/ws2812bdemo.c: In function 'WS2812BLEDCallback':
examples/ws2812demo/ws2812bdemo.c:27:30: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
  uint32_t fire = huetable[(rs+190&0xff)] | (huetable[(rs+30&0xff)]<<8) | (huetable[(rs+0)]<<16);
                            ~~^~~~
examples/ws2812demo/ws2812bdemo.c:27:57: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
  uint32_t fire = huetable[(rs+190&0xff)] | (huetable[(rs+30&0xff)]<<8) | (huetable[(rs+0)]<<16);
                                                       ~~^~~
In file included from examples/ws2812demo/ws2812bdemo.c:13:
At top level:
examples/ws2812demo/color_utilities.h:12:17: warning: 'EHSVtoHEX' defined but not used [-Wunused-function]
 static uint32_t EHSVtoHEX( uint8_t hue, uint8_t sat, uint8_t val )
                 ^~~~~~~~~

from ch32v003fun.

cnlohr avatar cnlohr commented on August 15, 2024

I meant if you switch ch32v003fun/ch32v003fun.c / .h

I can also switch the WS2812 project tonight.

I guess I can used __attribute__((used)) to nix the warning, and also prevent inclusion into the executable.

I am always leary to accept CI stuff since I very rarely work with it myself. Does this project interest you in a longer-scale time-frame? That if I have questions or issues with the CI stuff you would still probably take a look?

from ch32v003fun.

maxgerhardt avatar maxgerhardt commented on August 15, 2024

Sure'd have a look at CI if anything breaks. I'm the current and only maintainer of platform-ch32v after all.

Though I think you emant to reply in the PR? Doesn't matter either way.

from ch32v003fun.

cnlohr avatar cnlohr commented on August 15, 2024

Should we close this issue?

from ch32v003fun.

maxgerhardt avatar maxgerhardt commented on August 15, 2024

Well...

examples\debugprintfdemo\debugprintfdemo.c:33:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
   printf( "+%d\n", count++ );
             ~^     ~~~~~~~
             %ld
examples\debugprintfdemo\debugprintfdemo.c:36:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
   printf( "-%d\n", count++ );
             ~^     ~~~~~~~
             %ld
ch32v003fun\ch32v003fun.c: In function '_write':
ch32v003fun\ch32v003fun.c:900:12: warning: unused variable 'd' [-Wunused-variable]
   uint32_t d;
            ^
examples\sandbox\sandbox.c: In function 'SRAMCode':
examples\sandbox\sandbox.c:24:1: warning: 'noreturn' function does return
 }
 ^
 
examples\self_modify_code\self_modify_code.c: In function 'main':
examples\self_modify_code\self_modify_code.c:94:23: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
    printf( "%03x = %08x\n", i, rv );
                    ~~~^        ~~
                    %08lx
examples\uartdemo\uartdemo.c:32:20: warning: format '%d' expects argument of type 'int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
   printf( "Count: %d\n", count++ );
                   ~^     ~~~~~~~
                   %ld
examples\ws2812bdemo\ws2812bdemo.c:27:30: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
  uint32_t fire = huetable[(rs+190&0xff)] | (huetable[(rs+30&0xff)]<<8) | (huetable[(rs+0)]<<16);
                            ~~^~~~
examples\ws2812bdemo\ws2812bdemo.c:27:57: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
  uint32_t fire = huetable[(rs+190&0xff)] | (huetable[(rs+30&0xff)]<<8) | (huetable[(rs+0)]<<16);
                                                       ~~^~~
In file included from examples\ws2812bdemo\ws2812bdemo.c:13:
At top level:
examples\ws2812bdemo\color_utilities.h:12:17: warning: 'EHSVtoHEX' defined but not used [-Wunused-function]
 static uint32_t EHSVtoHEX( uint8_t hue, uint8_t sat, uint8_t val )
                 ^~~~~~~~~

Maybe it also helps to add -Wall into the makefiles to make these warnings more apparent.

from ch32v003fun.

cnlohr avatar cnlohr commented on August 15, 2024

Yeah, that's a good idea.

from ch32v003fun.

cnlohr avatar cnlohr commented on August 15, 2024

Should be fixed in 1d26dfa

from ch32v003fun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.