On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: > phc2pwm.c | 233 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 237 insertions(+), 2 deletions(-) > create mode 100644 phc2pwm.c
I wanted to try this today. There are some issues: /home/richard/git/linuxptp/phc2pwm.c: In function ‘main’: /home/richard/git/linuxptp/phc2pwm.c:222:3: error: ‘period’ may be used uninitialized in this function [-Werror=maybe-uninitialized] pwm_chan_set_period(chan, pwm_servo_sample(&ps, ts)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/richard/git/linuxptp/phc2pwm.c:193:8: error: ‘ptp_dev’ may be used uninitialized in this function [-Werror=maybe-uninitialized] clkid = phc_open(ptp_dev); ~~~~~~^~~~~~~~~~~~~~~~~~~ /home/richard/git/linuxptp/phc2pwm.c:203:8: error: ‘event_index’ may be used uninitialized in this function [-Werror=maybe-uninitialized] err = phc_enable_extts(clkid, event_index); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/richard/git/linuxptp/phc2pwm.c:197:9: error: ‘pwm_chan’ may be used uninitialized in this function [-Werror=maybe-uninitialized] chan = pwm_chan_create(pwm_chip, pwm_chan); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/richard/git/linuxptp/phc2pwm.c:197:9: error: ‘pwm_chip’ may be used uninitialized in this function [-Werror=maybe-uninitialized] cc1: all warnings being treated as errors Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel