Skip to content

Commit

Permalink
Fixed gcc's warning and began valgrinding
Browse files Browse the repository at this point in the history
  • Loading branch information
vasvlad committed Aug 9, 2013
1 parent 14d0aff commit e3906bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions omweather-hko-gov-hk-stations-db/src/meego-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ parse_forecast_weather(const char *detail_path_data, const char *result_file){
t_end = t_start + 3600*24 - 1;
fprintf(file_out," end=\"%li\">\n", t_end);
number_of_day ++;
fgets(buffer2, sizeof(buffer2), file_in2);
if (comma = strstr(buffer2, "no. ")){
if ((fgets(buffer2, sizeof(buffer2), file_in2) != NULL) && (comma = strstr(buffer2, "no. "))){
comma = comma + 3;
icon = atoi (comma);
snprintf(temp_buffer, sizeof(temp_buffer) - 1, "%i", icon);
Expand Down
5 changes: 4 additions & 1 deletion omweather-hko-gov-hk-stations-db/test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/bash
./hkogovhk ./examples/nday.htm ./examples/out.xml ./examples/englishwx2.htm
# ./hkogovhk ./examples/nday.htm ./examples/out.xml ./examples/englishwx2.htm

valgrind --tool=memcheck --log-file=1.log -v --track-origins=yes --leak-check=full --show-reachable=yes ./hkogovhk ./examples/nday.htm ./examples/out.xml ./examples/englishwx2.htm

0 comments on commit e3906bd

Please sign in to comment.