Commit 28a800fc authored by Jussi Kukkonen's avatar Jussi Kukkonen

Fixed compile warnings (missing includes and a

assignment-instead-of-comparison) in examples:

geoclue_map_example.c: In function ‘update_map’:
geoclue_map_example.c:113: warning: implicit declaration of function ‘free’
geoclue_map_example.c: In function ‘update’:
geoclue_map_example.c:131: warning: implicit declaration of function ‘malloc’
geoclue_map_example.c:131: warning: incompatible implicit declaration of built-in function ‘malloc’
geoclue_map_example.c: In function ‘image_size_callback’:
geoclue_map_example.c:190: warning: suggest parentheses around assignment used as truth value
geoclue_find_example.c: In function ‘main’:
geoclue_find_example.c:78: warning: implicit declaration of function ‘free’
geoclue_find_example.c:89: warning: unused variable ‘id’
geoclue_find_example.c:62: warning: unused variable ‘retncode’
parent 3c6de6dd
......@@ -16,6 +16,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <stdlib.h>
#include <gtk/gtk.h>
#include <geoclue/find.h>
......@@ -48,7 +49,7 @@ int main(int argc, char **argv) {
if(argv[1] == NULL)
{
printf("Please enter search term as arguement (geoclue-find-example \"wifi\"\n");
return(1);
exit(1);
}
......@@ -59,9 +60,10 @@ int main(int argc, char **argv) {
char** categories;
char** subcategories;
GEOCLUE_FIND_RETURNCODE retncode;
GEOCLUE_FIND_RETURNCODE retncode = 0;
// TODO: should set retncode properly
if(geoclue_find_top_level_categories(&categories) == GEOCLUE_FIND_SUCCESS)
{
......@@ -86,12 +88,10 @@ int main(int argc, char **argv) {
free(categories);
}
gint id;
geoclue_find_find_near (38.0,-95.0, "Food", argv[1], results, NULL);
g_main_run(loop);
return(0);
return(retncode);
}
......@@ -24,6 +24,7 @@
#include <geoclue/map_gtk.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define PROGRAM_HEIGHT 640
......@@ -187,7 +188,7 @@ void image_size_callback(GtkWidget*widget, GtkAllocation *event, gpointer data )
{
printf("Size Changed Starting update %d %d to %d %d\n", last_width ,last_height, event->width, event->height);
pending = TRUE;
if(reference_lat = -1234)
if(reference_lat == -1234)
{
reference_lat = DEFAULT_LAT;
reference_lon = DEFAULT_LON;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment